I tested xm block-attach command with a wrong
parameter(file:). Naturally a command error occurred. Then I retested
xm block-attach command with a correct parameter(phy:). But a command
error occurred again. The second command error occurred because Xend
did not remove device information from self.info when the first
command error occurred.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen-unstable changeset: 16777:
6f3fb3f86b68182bb61a661e81f346f653005852
xen-unstable date: Tue Jan 22 09:51:49 2008 +0000
self._createDevice(dev_type, dev_config_dict)
self._waitForDevice(dev_type, devid)
except VmError, ex:
+ del self.info['devices'][dev_uuid]
+ if dev_type == 'tap':
+ self.info['vbd_refs'].remove(dev_uuid)
+ else:
+ self.info['%s_refs' % dev_type].remove(dev_uuid)
raise ex
else:
devid = None