From 33d021a978fe17808b4ea4aa2c0143fd27309325 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 4 Aug 2008 11:11:24 +0100 Subject: [PATCH] xend: Fix handling of pci creation failure in device_create(). Signed-off-by: Yosuke Iwamatsu --- tools/python/xen/xend/XendDomainInfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 336dae0afa..485b5035dc 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -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) -- 2.30.2