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-devel

Re: [Xen-devel] bug using bootloader + patch

To: Eric Einhorn <lists@xxxxxxxxxxx>
Subject: Re: [Xen-devel] bug using bootloader + patch
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Tue, 13 Mar 2007 12:29:42 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 13 Mar 2007 05:28:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1107.64.253.47.218.1173788569.squirrel@post>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1107.64.253.47.218.1173788569.squirrel@post>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Tue, Mar 13, 2007 at 08:22:48AM -0400, Eric Einhorn wrote:

> Hi -devel,
> 
> I ran into an issue with the pyhton tools when using the bootloader option
> in 3.0.4.  4 out of 5 times xen would fail when trying to launch pygrub. 
> I tracked the cause down to XendDomainInfo.py's use of all_devices_sxpr()
> to find a valid block device.  Devices are stored inside a hash, which,
> will come back in an arbitrary order when you iterate it's values.  In my
> case, 4 out 5 times it would return my swap vbd first and try to launch
> pygrub on it.
> 
> Instead, I wanted to use get_vbs() to return the block devices since it
> should return a list in the order they were added with device_add() (from
> XendConfig.py).  I then found that in _sxp_to_api() the vbd_refs, as well
> as vif_refs and vtpm_refs are recreated by itterating over the device
> hash.  So it seems all that work device_add did to make a neat order list
> was tossed out.
> 
> I modified _sxp_to_api to copy the original device _refs lists instead of
> iterating to preserve the original order the devices were created.  Also,
> as mentioned earlier, I modified _configureBootloader to use get_vbds() so
> it will have direct access to the ref list.  I am able to boot with a
> bootload everytime now and have had no errors.
> 
> Attached is a patch for the changes I made against 3.0.4_1 if anyone is
> intersted.  Maybe it'll help someone else.

Thanks for this.  I believe that this problem is fixed in xen-unstable (and
has been for a little while) but certainly this patch may be useful to those
using 3.0.4.

Cheers,

Ewan.

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

<Prev in Thread] Current Thread [Next in Thread>