ia64/xen-unstable

changeset 18818:857bda0c15b3

xend: Make _setCPUAffinity() errors nonfatal on domain resume

This patch allows domains to be resumed on different number of CPUs. After
c/s 18764, a domain cannot be resumed when _setCPUAffinity() fails, which
happens when affinity should be set to a non-existent CPU. This patch
makes _setCPUAffinity() errors nonfatal.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Nov 20 14:17:09 2008 +0000 (2008-11-20)
parents e3a0c3c9fd7b
children db7a713071fe
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Nov 20 14:15:50 2008 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Nov 20 14:17:09 2008 +0000
     1.3 @@ -479,7 +479,14 @@ class XendDomainInfo:
     1.4          if state in (DOM_STATE_SUSPENDED, DOM_STATE_HALTED):
     1.5              try:
     1.6                  self._constructDomain()
     1.7 -                self._setCPUAffinity()
     1.8 +
     1.9 +                try:
    1.10 +                    self._setCPUAffinity()
    1.11 +                except:
    1.12 +                    # usually a CPU we want to set affinity to does not exist
    1.13 +                    # we just ignore it so that the domain can still be restored
    1.14 +                    log.warn("Cannot restore CPU affinity")
    1.15 +
    1.16                  self._storeVmDetails()
    1.17                  self._createChannels()
    1.18                  self._createDevices()