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] PATCH: Teardown domain if device hotplug fails during startu

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] PATCH: Teardown domain if device hotplug fails during startup
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Thu, 17 May 2007 23:09:20 +0100
Delivery-date: Thu, 17 May 2007 15:07:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
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>


Before:

  # xm start fc6pvtest
  Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
  Usage: xm start <DomainName>

  Start a Xend managed domain
    -p, --paused                   Do not unpause domain after starting it    

  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  3516     2     r-----    128.9
  fc6pvtest                                  3   500     1     --p---      0.0



After:

  # xm start fc6pvtest
  Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
  Usage: xm start <DomainName>

  Start a Xend managed domain
    -p, --paused                   Do not unpause domain after starting it

  # xm list
  Name                                      ID   Mem VCPUs      State   Time(s)
  Domain-0                                   0  3516     2     r-----    128.9




Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

Attachment: xen-start-fail-cleanup.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] PATCH: Teardown domain if device hotplug fails during startup, Daniel P. Berrange <=