[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.1-testing] xend: On block-attach, remove device information when VmError occurs.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1201001263 0 # Node ID 8aa1cae76e082b45b7f073e036197ad1898ffa6e # Parent b6f889cd8a6aca685a148d2bfdd85a8c992e6a05 xend: On block-attach, remove device information when VmError occurs. 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@xxxxxxxxxxxxxx> xen-unstable changeset: 16777:6f3fb3f86b68182bb61a661e81f346f653005852 xen-unstable date: Tue Jan 22 09:51:49 2008 +0000 --- tools/python/xen/xend/XendDomainInfo.py | 5 +++++ 1 files changed, 5 insertions(+) diff -r b6f889cd8a6a -r 8aa1cae76e08 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 11:27:18 2008 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 11:27:43 2008 +0000 @@ -519,6 +519,11 @@ class XendDomainInfo: 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 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |