Record the last shutdown reason for each VM in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-01-05 15:38:01 +00:00
1 parent 79a9f1f484
commit 8787be2922
2 files changed
+3

No files matched your search

+1
View File
@@ -80,6 +80,7 @@ ZOMBIE_PREFIX = 'Zombie-'
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)
+2
View File
@@ -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()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.