WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: On block-attach, remove device info

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: On block-attach, remove device information when VmError occurs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:10:14 -0800
Delivery-date: Wed, 23 Jan 2008 01:11:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200995509 0
# Node ID 6f3fb3f86b68182bb61a661e81f346f653005852
# Parent  2af5fb3e34e54e96d0c58e0e4557ee1240df9ce8
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>
---
 tools/python/xen/xend/XendDomainInfo.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 2af5fb3e34e5 -r 6f3fb3f86b68 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 22 09:50:06 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 22 09:51:49 2008 +0000
@@ -535,6 +535,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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: On block-attach, remove device information when VmError occurs., Xen patchbot-unstable <=