From: Jiri Denemark Subject: [PATCH] xend: Make _setCPUAffinity() errors nonfatal on domain resume Date: Thu, 20 Nov 2008 11:19:13 +0100 Message-ID: <20081120101913.GB14172@orkuz.home> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, 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 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cpu-affinity_2.patch" diff -r 98d48f7680db tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Nov 19 19:13:22 2008 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Nov 20 11:18:52 2008 +0100 @@ -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() --17pEHd4RhPHOinZp Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --17pEHd4RhPHOinZp--