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] The disk isn't guaranteed to be the first device in the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The disk isn't guaranteed to be the first device in the config sxp --
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Feb 2006 11:54:08 +0000
Delivery-date: Sun, 26 Feb 2006 11:54:33 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID af6a564ea81c9cfde03d728d691bbe27086bdd7a
# Parent  c7550ed2ccbf0c2498591c2a878cb6068f573982
The disk isn't guaranteed to be the first device in the config sxp --
make sure we can restart domains when using a boot loader even if not.

Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx>

diff -r c7550ed2ccbf -r af6a564ea81c tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Sun Feb 26 09:54:06 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py   Sun Feb 26 09:55:21 2006
@@ -1502,15 +1502,14 @@
         if not self.info['bootloader']:
             return
         # if we're restarting with a bootloader, we need to run it
-        # FIXME: this assumes the disk is the first device and
-        # that we're booting from the first disk
         blcfg = None
         config = self.sxpr()
         # FIXME: this assumes that we want to use the first disk
-        dev = sxp.child_value(config, "device")
-        if dev:
-            disk = sxp.child_value(dev, "uname")
-            fn = blkdev_uname_to_file(disk)
+        for dev in sxp.children(config, "device"):
+            disk = sxp.child(dev, "vbd")
+            if disk is None:
+                continue
+            fn = blkdev_uname_to_file(sxp.child_value(disk, "uname"))
             blcfg = bootloader(self.info['bootloader'], fn, 1,
                                self.info['vcpus'])
         if blcfg is None:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The disk isn't guaranteed to be the first device in the config sxp --, Xen patchbot -unstable <=