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: Fix device release for tap devices

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix device release for tap devices
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:51:01 -0800
Delivery-date: Mon, 01 Dec 2008 03:54:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1227877558 0
# Node ID 8dbf23c89cc6a4fbd7b9063b14e706c065ba1678
# Parent  abada55aec43c15c3589a4ff28cd2b8ccaaff0f8
xend: Fix device release for tap devices

I saw an error message when I shut down a domain.  The error
message showed that release of device(vbd/51712) failed.  But the
device was tap, was not vbd.  I think that a cause of the error message is
because _releaseDevices() calls destroyDevice() by wrong device class.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -r abada55aec43 -r 8dbf23c89cc6 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 28 13:04:30 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 28 13:05:58 2008 +0000
@@ -1990,13 +1990,21 @@ class XendDomainInfo:
             for devclass in XendDevices.valid_devices():
                 for dev in t.list(devclass):
                     try:
+                        true_devclass = devclass
+                        if devclass == 'vbd':
+                            # In the case of "vbd", the true device class
+                            # may possibly be "tap". Just in case, verify
+                            # device class.
+                            devid = dev.split('/')[-1]
+                            true_devclass = self.getBlockDeviceClass(devid)
                         log.debug("Removing %s", dev);
-                        self.destroyDevice(devclass, dev, False);
+                        self.destroyDevice(true_devclass, dev, False);
                     except:
                         # Log and swallow any exceptions in removal --
                         # there's nothing more we can do.
                         log.exception("Device release failed: %s; %s; %s",
-                                      self.info['name_label'], devclass, dev)
+                                      self.info['name_label'],
+                                      true_devclass, dev)
         finally:
             t.abort()
 

_______________________________________________
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: Fix device release for tap devices, Xen patchbot-unstable <=