ia64/xen-unstable

changeset 17383:da35b52c4fd7

xend: Add "dumpcore_in_progress" flag to xenstore information

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 03 11:37:23 2008 +0100 (2008-04-03)
parents a2903704c17a
children 0834234fd668
files tools/python/xen/xend/XendConstants.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConstants.py	Thu Apr 03 11:34:21 2008 +0100
     1.2 +++ b/tools/python/xen/xend/XendConstants.py	Thu Apr 03 11:37:23 2008 +0100
     1.3 @@ -96,6 +96,7 @@ ZOMBIE_PREFIX = 'Zombie-'
     1.4  MINIMUM_RESTART_TIME = 20
     1.5  
     1.6  RESTART_IN_PROGRESS = 'xend/restart_in_progress'
     1.7 +DUMPCORE_IN_PROGRESS = 'xend/dumpcore_in_progress'
     1.8  LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
     1.9  
    1.10  TRIGGER_NMI   = 0
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Apr 03 11:34:21 2008 +0100
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Apr 03 11:37:23 2008 +0100
     2.3 @@ -1792,10 +1792,13 @@ class XendDomainInfo:
     2.4                  raise XendError("Cannot dump core in a directory: %s" %
     2.5                                  corefile)
     2.6              
     2.7 +            self._writeVm(DUMPCORE_IN_PROGRESS, 'True')
     2.8              xc.domain_dumpcore(self.domid, corefile)
     2.9 +            self._removeVm(DUMPCORE_IN_PROGRESS)
    2.10          except RuntimeError, ex:
    2.11              corefile_incomp = corefile+'-incomplete'
    2.12              os.rename(corefile, corefile_incomp)
    2.13 +            self._removeVm(DUMPCORE_IN_PROGRESS)
    2.14              log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s",
    2.15                            self.domid, self.info['name_label'])
    2.16              raise XendError("Failed to dump core: %s" %  str(ex))