From: Yosuke Iwamatsu Subject: [PATCH] xend: Fix handling of pci creation failure in device_create() Date: Mon, 04 Aug 2008 16:00:58 +0900 Message-ID: <4896A92A.9040805@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090907080404050900030004" Return-path: 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 This is a multi-part message in MIME format. --------------090907080404050900030004 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Fix handling of pci creation failure in device_create(). Since xen-api instances of pci devices are stored in XendAPIStore, we need to deregister them when device creation failed. Regards, ----------------------- Yosuke Iwamatsu NEC Corporation --------------090907080404050900030004 Content-Type: all/allfiles; name="device_create_pci_err.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="device_create_pci_err.patch" xend: Fix handling of pci creation failure in device_create(). Signed-off-by: Yosuke Iwamatsu diff -r 8951c3b84e2a tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri Aug 01 09:54:54 2008 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Mon Aug 04 11:21:05 2008 +0900 @@ -638,7 +638,10 @@ class XendDomainInfo: self._waitForDevice(dev_type, devid) except VmError, ex: del self.info['devices'][dev_uuid] - if dev_type == 'tap': + if dev_type == 'pci': + for dev in dev_config_dict['devs']: + XendAPIStore.deregister(dev['uuid'], 'DPCI') + elif dev_type == 'tap': self.info['vbd_refs'].remove(dev_uuid) else: self.info['%s_refs' % dev_type].remove(dev_uuid) --------------090907080404050900030004 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 --------------090907080404050900030004--