[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Record the last shutdown reason for each VM in the store.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1168011481 0
# Node ID 5f86325c62f6c94177360717d7fc56e6f5fee2ef
# Parent  efbfcc3b9f38aba7a58dd7d086bdec1a48bbc129
Record the last shutdown reason for each VM in the store.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConstants.py  |    1 +
 tools/python/xen/xend/XendDomainInfo.py |    2 ++
 2 files changed, 3 insertions(+)

diff -r efbfcc3b9f38 -r 5f86325c62f6 tools/python/xen/xend/XendConstants.py
--- a/tools/python/xen/xend/XendConstants.py    Fri Jan 05 15:34:47 2007 +0000
+++ b/tools/python/xen/xend/XendConstants.py    Fri Jan 05 15:38:01 2007 +0000
@@ -80,6 +80,7 @@ MINIMUM_RESTART_TIME = 20
 MINIMUM_RESTART_TIME = 20
 
 RESTART_IN_PROGRESS = 'xend/restart_in_progress'
+LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
 
 #
 # Device migration stages (eg. XendDomainInfo, XendCheckpoint, server.tpmif)
diff -r efbfcc3b9f38 -r 5f86325c62f6 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Jan 05 15:34:47 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Jan 05 15:38:01 2007 +0000
@@ -969,6 +969,7 @@ class XendDomainInfo:
 
                 log.warn('Domain has crashed: name=%s id=%d.',
                          self.info['name_label'], self.domid)
+                self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
 
                 if xroot.get_enable_dump():
                     self.dumpCore()
@@ -988,6 +989,7 @@ class XendDomainInfo:
 
                     log.info('Domain has shutdown: name=%s id=%d reason=%s.',
                              self.info['name_label'], self.domid, reason)
+                    self._writeVm(LAST_SHUTDOWN_REASON, reason)
 
                     self._clearRestart()
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.