aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-04 11:11:24 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-04 11:11:24 +0100
commit33d021a978fe17808b4ea4aa2c0143fd27309325 (patch)
tree833345f64db6dabca04af466e288d1822de6322a
parentf6a15c6354d6a04ce8943fce9bd6e790ead4556a (diff)
downloadxen-33d021a978fe17808b4ea4aa2c0143fd27309325.tar.gz
xen-33d021a978fe17808b4ea4aa2c0143fd27309325.tar.bz2
xen-33d021a978fe17808b4ea4aa2c0143fd27309325.zip
xend: Fix handling of pci creation failure in device_create().
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py5
1 files changed, 4 insertions, 1 deletions
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)