Ever since patchset 8648 (xen-unstable.hg) all my configuration files
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sun, 29 Jan 2006 09:52:43 +0000 (10:52 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sun, 29 Jan 2006 09:52:43 +0000 (10:52 +0100)
fail with the following:

Error: Device 768 (vbd) could not be connected. Hotplug scripts not working.

(Since my HVM tree follows xen-unstable.hg closely, it breaks too).

The following patch undoes a small part of Ke Yu's patch and fixes the
problem.

However, I'm having trouble understanding what this part did in the
original patch. Was there a subtle change in the disk variable format
that I missed?

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
tools/python/xen/xend/server/blkif.py

index 02cd4f26f7d671dbd32cd6479df37f928bb048ce..23135aa08bf2490063b2e9ca6a2b4b19cef6f879 100644 (file)
@@ -42,6 +42,10 @@ class BlkifController(DevController):
         """@see DevController.getDeviceDetails"""
 
         dev = sxp.child_value(config, 'dev')
+        if 'ioemu:' in dev:
+            return (None,{},{})
+
+        devid = blkif.blkdev_name_to_number(dev)
 
         (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1)
         back = { 'dev'    : dev,
@@ -50,13 +54,7 @@ class BlkifController(DevController):
                  'mode'   : sxp.child_value(config, 'mode', 'r')
                  }
 
-        if 'ioemu:' in dev:
-            (dummy, dev1) = string.split(dev, ':', 1)
-            devid = blkif.blkdev_name_to_number(dev1)
-            front = {}
-        else:
-            devid = blkif.blkdev_name_to_number(dev)
-            front = { 'virtual-device' : "%i" % devid }
+        front = { 'virtual-device' : "%i" % devid }
 
         return (devid, back, front)