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:
Keir Fraser committed 2008-08-04 11:11:24 +01:00
1 parent f6a15c6354
commit 33d021a978
1 file changed
+4 -1
+4 -1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.