ia64/xen-unstable

changeset 15234:152dc0d812b2

xend: Don't destroy domains on shutdown timeout.

Do not destroy domains on shutdown timeout: the administrator needs to
be able to decide what to do if a domain does not shut down.

Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Wed May 30 10:06:23 2007 +0100 (2007-05-30)
parents 1bad5a932df5
children 1f7a6456c330
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed May 30 10:04:23 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed May 30 10:06:23 2007 +0100
     1.3 @@ -1128,8 +1128,8 @@ class XendDomainInfo:
     1.4                  # failed.  Ignore this domain.
     1.5                  pass
     1.6              else:
     1.7 -                # Domain is alive.  If we are shutting it down, then check
     1.8 -                # the timeout on that, and destroy it if necessary.
     1.9 +                # Domain is alive.  If we are shutting it down, log a message
    1.10 +                # if it seems unresponsive.
    1.11                  if xeninfo['paused']:
    1.12                      self._stateSet(DOM_STATE_PAUSED)
    1.13                  else:
    1.14 @@ -1138,11 +1138,11 @@ class XendDomainInfo:
    1.15                  if self.shutdownStartTime:
    1.16                      timeout = (SHUTDOWN_TIMEOUT - time.time() +
    1.17                                 self.shutdownStartTime)
    1.18 -                    if timeout < 0:
    1.19 +                    if (timeout < 0 and not self.readDom('xend/unresponsive')):
    1.20                          log.info(
    1.21                              "Domain shutdown timeout expired: name=%s id=%s",
    1.22                              self.info['name_label'], self.domid)
    1.23 -                        self.destroy()
    1.24 +                        self.storeDom('xend/unresponsive', 'True')
    1.25          finally:
    1.26              self.refresh_shutdown_lock.release()
    1.27