mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Fix handling of pci creation failure in device_create().
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
This commit is contained in:
1 parent
f6a15c6354
commit
33d021a978
1 file changed
+4
-1
@@ -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)
|
||||
|
||||