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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xend: Tear down domain if device hotplug

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Tear down domain if device hotplug fails during startup
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:15:38 -0700
Delivery-date: Mon, 04 Jun 2007 03:30:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180011958 -3600
# Node ID f07c1bb86d6c54458ff944e71453173cbf567ed2
# Parent  853853686147c4e863551b5742ca424e2929599a
xend: Tear down domain if device hotplug fails during startup

If creating an unmanaged guest (eg xm create), if device hotplug fails
during the startup of the guest, then the guest will be torn down
again. If creating and starting a managed guest (eg xm new && xm
start), then if device hotplug fails, the still born guest gets left
in 'paused' state. This confuses users no end, who go an unpause and
then get all upset when it shortly crashes (due to lack of disk or
network devices).

The attached patch fixes XenDomain.py's domain_start() method so that
if waitForDevices() fails, then the entire domain is torn down. This
is the same approach used in xm create.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
 tools/python/xen/xend/XendDomain.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r 853853686147 -r f07c1bb86d6c tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu May 24 14:02:09 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Thu May 24 14:05:58 2007 +0100
@@ -985,10 +985,16 @@ class XendDomain:
             dominfo.start(is_managed = True)
-        dominfo.waitForDevices()
+        try:
+            dominfo.waitForDevices()
+        except Exception, ex:
+            log.warn("Failed to setup devices for " + str(dominfo) + ": " + 
+            dominfo.destroy()
+            raise
         if not start_paused:
     def domain_delete(self, domid):
         """Remove a managed domain from database

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Tear down domain if device hotplug fails during startup, Xen patchbot-unstable <=