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

Re: [Xen-devel] [PATCH][XEND] Don't call destroy() on exception instart(

To: "Puthiyaparambil, Aravindh" <aravindh.puthiyaparambil@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH][XEND] Don't call destroy() on exception instart()
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Sat, 17 Feb 2007 16:55:56 +0900
Delivery-date: Fri, 16 Feb 2007 23:55:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <EF8D308BE33AF54D8934DF26520252D30626BBF3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <EF8D308BE33AF54D8934DF26520252D30626BBF3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Aravindh,

I think that destroy() is need. If a domain creating failed by 
xm start command, it cleans up the unfinished domain. 

If your patch is applied, the unfinished domain is not cleaned 
up as follows. (I'm able to fail the domain creating by giving 
a wrong parameter(vcpus=33).)

# xm new /xen/vm1.conf vcpus=33
Using config file "/xen/vm1.conf".
# xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0   942     2     r-----     68.1
vm1                                            256    33                 0.0
# xm start vm1
Error: (22, 'Invalid argument')
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   942     2     r-----     69.1
vm1                                        1   256    33     ------      0.0


If currently xen-unstable, the unfinished domain is cleaned up 
as follows.

# xm new /xen/vm1.conf vcpus=33
Using config file "/xen/vm1.conf".
# xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0   942     2     r-----     67.8
vm1                                            256    33                 0.0
# xm start vm1
Error: (22, 'Invalid argument')
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   942     2     r-----     68.7
vm1                                            256    33                 0.0


Best regards,
 Kan

>destroy() is being called on exception in both start() and create(). It
>needs to be called only in create().
>
>Signed-off-by: Aravindh Puthiyaparambil
><aravindh.puthiyaparambil@xxxxxxxxxx>
>
>-------------------------------text/plain-------------------------------
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>