Package: xen-utils-3.0.3-1
Version: 3.0.3-0-4
Severity: normal

Rebooting from inside domU hangs in initrd:

  Begin: Waiting for root file system... ...

Root file system is not available because underlying DRBD device
got deactivated during reboot:

  $ cat /proc/drbd 
  version: 8.0.13 (api:86/proto:86)
  GIT-hash: ee3ad77563d2e87171a3da17cc002ddfd1677dbe build by [EMAIL 
PROTECTED], 2008-08-04 15:28:07
   1: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
      ns:46440 nr:0 dw:46440 dr:427691 al:25 bm:717 lo:0 pe:0 ua:0 ap:0
          resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
          act_log: used:0/127 hits:6821 misses:25 starving:0 dirty:0 changed:25

Destroying/creating the old/new domain generates the udev remove/add 
events in correct order and cause a parallel execution of xen block scripts:

  Sep 24 16:59:32 srv logger: /etc/xen/scripts/block: remove 
XENBUS_PATH=backend/vbd/39/2049
  Sep 24 16:59:32 srv logger: /etc/xen/scripts/block: add 
XENBUS_PATH=backend/vbd/40/2049
  Sep 24 16:59:32 srv logger: /etc/xen/scripts/block-drbd: add 
XENBUS_PATH=backend/vbd/40/2049
  Sep 24 16:59:33 srv logger: /etc/xen/scripts/block-drbd: remove 
XENBUS_PATH=backend/vbd/39/2049
  Sep 24 16:59:33 srv logger: /etc/xen/scripts/block-drbd: Writing 
backend/vbd/40/2049/physical-device 93:1 to xenstore.
  Sep 24 16:59:33 srv logger: /etc/xen/scripts/block-drbd: Writing 
backend/vbd/40/2049/hotplug-status connected to xenstore.

Quite often the block(add) script runs first leaving the device in Primary 
state,
but then the block(remove) script causes it to go from Primary to Secondary.

Attached patch causes xend to wait for devices to get removed before creating
the new domain.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-xen-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages xen-utils-3.0.3-1 depends on:
ii  iproute                20061002-3        Professional tools to control the 
ii  libc6                  2.3.6.ds1-13etch7 GNU C Library: Shared libraries
ii  libncurses5            5.5-5             Shared libraries for terminal hand
ii  python                 2.4.4-2           An interactive high-level object-o
ii  python-central         0.5.12            register and build utility for Pyt
ii  udev                   0.105-4           /dev/ and hotplug management daemo
ii  xen-utils-common       3.0.3-0-2         XEN administrative tools - common 
ii  zlib1g                 1:1.2.3-13        compression library - runtime

Versions of packages xen-utils-3.0.3-1 recommends:
ii  bridge-utils                  1.2-1      Utilities for configuring the Linu
ii  xen-hypervisor-3.0.3-1-amd64  3.0.3-0-4  The Xen Hypervisor on AMD64

-- no debconf information
--- /usr/lib/xen-3.0.3-1/lib/python/xen/xend/XendDomainInfo.py.dist     
2008-09-24 16:37:28.000000000 +0200
+++ /usr/lib/xen-3.0.3-1/lib/python/xen/xend/XendDomainInfo.py  2008-09-24 
16:38:16.000000000 +0200
@@ -1670,6 +1670,7 @@
             else:
                 self.unwatchVm()
                 self.destroyDomain()
+                self.testDeviceComplete()
 
             # new_dom's VM will be the same as this domain's VM, except where
             # the rename flag has instructed us to call preserveForRestart.

Reply via email to