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

[Xen-devel] Non-Blocking block-* hotplug scripts

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Non-Blocking block-* hotplug scripts
From: Michael Renner <michael.renner@xxxxxxxxxxx>
Date: Thu, 03 Sep 2009 19:00:32 +0200
Delivery-date: Thu, 03 Sep 2009 10:01:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Preisvergleich Internet Services AG
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Hi,

the non-blocking/asynchronous behavior of the block-* helper scripts gives me a bit of trouble with drbd and bootloader/pygrub.

The output is based on my previous patches which add drbdadm calls to XendDomainInfo before invoking the bootloader.

I added a bit of logging output to XendDomainInfo, the generic xen/scripts/block script and the block-drbd variant which is shipped with Debian Lenny to get an impression on how the call flow looks like.


Here's the output of a DomU start:

2009-09-03T18:36:53.538820+02:00 fat logger: Welcome to XendDomainInfo. Booting from drbd, checking if we need to primary our device 2009-09-03T18:36:53.569303+02:00 fat logger: XendDomainInfo: Yep, we need to, doing so 2009-09-03T18:36:53.585282+02:00 fat kernel: [265397.149629] drbd0: role( Secondary -> Primary )
2009-09-03T18:36:53.675462+02:00 fat logger: pyGrub opens device
2009-09-03T18:36:54.486216+02:00 fat logger: Falling through xen/scripts/block, invoking block-drbd 2009-09-03T18:36:54.529073+02:00 fat logger: Welcome to block-drbd. Going to add backend/vbd/69/51712



Here's the output of a halt:

2009-09-03T18:38:17.305340+02:00 fat logger: Falling through xen/scripts/block, invoking block-drbd 2009-09-03T18:38:17.362104+02:00 fat logger: Welcome to block-drbd. Going to remove backend/vbd/69/51712 2009-09-03T18:38:17.365940+02:00 fat logger: Starting to secondary device backend/vbd/69/51712 2009-09-03T18:38:17.395514+02:00 fat kernel: [265481.059020] drbd0: role( Primary -> Secondary )
2009-09-03T18:38:17.401010+02:00 fat logger: Finished to secondary device



And here's the reboot:

# Reboot in progress, xen tears down VDBs
2009-09-03T18:36:18.702089+02:00 fat logger: Falling through xen/scripts/block, invoking block-drbd

# Xen starts domU startup
2009-09-03T18:36:18.724829+02:00 fat logger: Welcome to XendDomainInfo. Booting from drbd, checking if we need to primary our device
2009-09-03T18:36:18.761239+02:00 fat logger: XendDomainInfo: No, we dont

# Teardown still going on
2009-09-03T18:36:18.780534+02:00 fat logger: Welcome to block-drbd. Going to remove backend/vbd/67/51712 2009-09-03T18:36:18.784394+02:00 fat logger: Starting to secondary device backend/vbd/67/51712 2009-09-03T18:36:18.820255+02:00 fat kernel: [265362.340571] drbd0: role( Primary -> Secondary )
2009-09-03T18:36:18.827696+02:00 fat logger: Finished to secondary device

# pygrub gets invoked by xend, trying to access a unreachable blockdevice
2009-09-03T18:36:18.869304+02:00 fat logger: pyGrub opens device

---


I could always hack around this situation by adding a sleep before running the drbd specific bringup in _configureBootloader, but this is a very optimistic approach to synchronisation.

Is it possible to make the destruction of VBDs to wait for the block(-*) hotplug scripts to return?

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Non-Blocking block-* hotplug scripts, Michael Renner <=