[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.