diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-11-20 14:17:09 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-11-20 14:17:09 +0000 |
commit | ed2dbb7a0f02407633a19bf57a1106e0c39a290b (patch) | |
tree | 029b378b9f90b2552e9169663838bb8100ab4fc2 /tools | |
parent | 9e70091fd71e108c5cb3cf89fa677030b088a0a8 (diff) | |
download | xen-ed2dbb7a0f02407633a19bf57a1106e0c39a290b.tar.gz xen-ed2dbb7a0f02407633a19bf57a1106e0c39a290b.tar.bz2 xen-ed2dbb7a0f02407633a19bf57a1106e0c39a290b.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index eae2a6eea2..bab9d3aef2 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -479,7 +479,14 @@ class XendDomainInfo: if state in (DOM_STATE_SUSPENDED, DOM_STATE_HALTED): try: self._constructDomain() - self._setCPUAffinity() + + try: + self._setCPUAffinity() + except: + # usually a CPU we want to set affinity to does not exist + # we just ignore it so that the domain can still be restored + log.warn("Cannot restore CPU affinity") + self._storeVmDetails() self._createChannels() self._createDevices() |