Puthiyaparambil, Aravindh
2007-Feb-16 17:48 UTC
[Xen-devel] [PATCH][XEND] Don''t call destroy() on exception in start()
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@unisys.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2007-Feb-17 07:55 UTC
Re: [Xen-devel] [PATCH][XEND] Don''t call destroy() on exception instart()
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@unisys.com> > >-------------------------------text/plain------------------------------- >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Puthiyaparambil, Aravindh
2007-Feb-17 22:36 UTC
RE: [Xen-devel] [PATCH][XEND] Don''t call destroy() on exception instart()
The problem we were running into was that if we try to start a domain for which there is not enough memory we get an "Error: an integer is required" message. Please see the attached xend log. On debugging further I saw that the destroy() in start() was happening with Null domain id because it was already destroyed in create(). But you are indeed correct in that it is required for the "xm start" scenario. I did not think about that. I guess I need to come up with another solution. Thanks, Aravindh> -----Original Message----- > From: Masaki Kanno [mailto:kanno.masaki@jp.fujitsu.com] > Sent: Saturday, February 17, 2007 2:56 AM > To: Puthiyaparambil, Aravindh; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] [PATCH][XEND] Don''t call destroy() onexception> instart() > > 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 startingit> > # 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 startingit> > # 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@unisys.com> > > > >-------------------------------text/plain-------------------------------> >_______________________________________________ > >Xen-devel mailing list > >Xen-devel@lists.xensource.com > >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2007-Feb-18 00:59 UTC
Re: [Xen-devel] [PATCH][XEND] Don''t call destroy() on exception instart()
On Sat, Feb 17, 2007 at 05:36:52PM -0500, Puthiyaparambil, Aravindh wrote:> The problem we were running into was that if we try to start a domain > for which there is not enough memory we get an "Error: an integer is > required" message. Please see the attached xend log. On debugging > further I saw that the destroy() in start() was happening with Null > domain id because it was already destroyed in create().This has been fixed in xen-unstable changeset: 13949:82f66bc01da2cb14062c0651a63dbf7286cfd1e7 user: Wim Colgate <wim@xensource.com> date: Wed Feb 14 12:18:32 2007 -0800 files: tools/python/xen/xend/XendDomainInfo.py description: Protect self.domid from being empty Cheers, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Apparently Analagous Threads
- [PATCH][RESEND][Builder] Check if v_end wraps around to 0
- [PATCH] xen: Add GS base to HVM VCPU context
- RE: Error "Device 0 (vif) could not be connected"
- [PATCH] Make "xm mem-set" be lower bound on domX-min-mem
- "xm list" causing "OverflowError: int exceeds XML-RPC limits"