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] Fix "Error: Device 51952 not connected"?e

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix "Error: Device 51952 not connected"?error when using pygrub
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Aug 2010 07:00:58 -0700
Delivery-date: Wed, 18 Aug 2010 07:05:59 -0700
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 eXeC001er <execooler@xxxxxxxxx>
# Date 1281975090 -3600
# Node ID cd5b4135fe03da4f2184d2a43659138d22163ed9
# Parent  2f1f35359317a116ea9683a206d639633e29699f
Fix "Error: Device 51952 not connected"?error when using pygrub

The following is the process of booting a DomU with 'mounted-blktap2' (VHD
for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 the created device is disconnected from Dom0, but
xenstore?does not?scrape away after the device is disconnected so you
get the following error:

?? ?"Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 xend calls destroyDevice always with 'tap' as argument.

Signed-off-by: eXeC001er <execooler@xxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
committer: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r 2f1f35359317 -r cd5b4135fe03 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Aug 16 17:04:31 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Aug 16 17:11:30 2010 +0100
@@ -3261,6 +3261,7 @@ class XendDomainInfo:
 
             taptype = blkdev_uname_to_taptype(disk)
             mounted = devtype in ['tap', 'tap2'] and taptype != 'aio' and 
taptype != 'sync' and not os.stat(fn).st_rdev
+            mounted_vbd_uuid = 0
             if mounted:
                 # This is a file, not a device.  pygrub can cope with a
                 # file if it's raw, but if it's QCOW or other such formats
@@ -3276,7 +3277,8 @@ class XendDomainInfo:
 
                 from xen.xend import XendDomain
                 dom0 = XendDomain.instance().privilegedDomain()
-                dom0._waitForDeviceUUID(dom0.create_vbd(vbd, disk))
+                mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
+                dom0._waitForDeviceUUID(mounted_vbd_uuid)
                 fn = BOOTLOADER_LOOPBACK_DEVICE
 
             try:
@@ -3286,8 +3288,9 @@ class XendDomainInfo:
                 if mounted:
                     log.info("Unmounting %s from %s." %
                              (fn, BOOTLOADER_LOOPBACK_DEVICE))
-
-                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
+                    _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
+                    
dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']), 
+                                       BOOTLOADER_LOOPBACK_DEVICE, force = 
True)
 
             if blcfg is None:
                 msg = "Had a bootloader specified, but can't find disk"

_______________________________________________
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] Fix "Error: Device 51952 not connected"?error when using pygrub, Xen patchbot-unstable <=