Michael Renner
2009-Sep-03 13:16 UTC
[Xen-devel] [PATCH] Support "bootloader" mode for "drbd:" devices
There''s a bit of glue missing in xend to support the "bootloader" stanza in Guests which use a "drbd:" device as their bootdevice. This patch extends and supersedes Bug #1438. To be able to use "bootloader" on drbd devices the following changes need to be done: *) Translation of devicename _parse_uname which is used by blkdev_uname_to_file which is again used by _configureBootloader in XendDomainInfo needs to be able to resolve drbd resouces to the corresponding blockdevice to feed to the configured bootloader. *) Activation of drbd device If the drbd device isn''t in Primary mode when the bootloader tries to fetch the kernel and initrd, the start of the DomU will fail. To prevent this the given drbd device will be made Primary before the bootloader gets executed. The patches need some revising since I''m neither very fluent in Python nor familiar with the error handling infrastructure in xend. subprocess has been replaced by os.popen2 and os.system per comment from Masaki Kanno in #1506. A note on the naming of drbd resouces: drbd uses mostly resource names in it''s userland tools. Because of that drbd VBDs, if configured with the "drbd:" type, should always use the drbd resource name as suggested by the drbd documentation at http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html . My patches assume that the VBDs are named accordingly. Signed-off-by: Michael Renner <michael.renner <at> geizhals.at> best regards, Michael Renner -- Geizhals(R) - Preisvergleich Preisvergleich Internet Services AG Obere Donaustrasse 63/2 A-1020 Wien Tel: +43 1 5811609/87 Fax: +43 1 5811609/55 Handelsgericht Wien | FN 197241K | Firmensitz Wien _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel