xend: Fix handling of pci creation failure in device_create()
PATCH 1/1 xend: Fix handling of pci creation failure in device_create()
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
xend: Fix handling of pci creation failure in device_create().
Signed-off-by Yosuke Iwamatsu <[email protected]>
tools/python/xen/xend/XendDomainInfo.py +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)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel