[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xend: do not polling vcpus info if guest state is not RUNNING or PAUSED



On Tue, Nov 19, 2013 at 09:06:51AM -0500, Konrad Rzeszutek Wilk wrote:
> On Tue, Nov 19, 2013 at 06:41:37PM +0800, Joe Jin wrote:
[...]
> > 
> > Yes your right, this patch just reduce the window. 
> > I created a new patch for this, please comment!
> > 
> > [PATCH] xend: getVCPUInfo should handle died domain
> > 
> > When created new guest on NUMA server, xend tried to get the best node by
> > calculated all vcpus info, the race is if other geust is rebooting, the
> > guest in the list when entered find_relaxed_node(), but when call
> > getVCPUInfo() the guest already be terminated, then getVCPUInfo() will
> > fail with  below error:
> > 
> > [2013-09-04 20:01:26 6254] ERROR (XendDomainInfo:496) VM start failed
> > Traceback (most recent call last):
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", 
> > line 482, in start
> >     XendTask.log_progress(31, 60, self._initDomain)
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendTask.py", line 209, 
> > in log_progress
> >     retval = func(*args, **kwds)
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", 
> > line 2918, in _initDomain
> >     node = self._setCPUAffinity()
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", 
> > line 2835, in _setCPUAffinity
> >     best_node = find_relaxed_node(candidate_node_list)[0]
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", 
> > line 2803, in find_relaxed_node
> >     cpuinfo = dom.getVCPUInfo()
> >   File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", 
> > line 1600, in getVCPUInfo
> >     raise XendError(str(exn))
> > XendError: (3, 'No such process')
> > 
> > This patch will handle the situation.
> > 
> > Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
> > ---
> >  tools/python/xen/xend/XendDomainInfo.py |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/tools/python/xen/xend/XendDomainInfo.py 
> > b/tools/python/xen/xend/XendDomainInfo.py
> > index e9d3e7e..c6414ed 100644
> > --- a/tools/python/xen/xend/XendDomainInfo.py
> > +++ b/tools/python/xen/xend/XendDomainInfo.py
> > @@ -34,6 +34,7 @@ import os
> >  import stat
> >  import shutil
> >  import traceback
> > +import errno
> >  from types import StringTypes
> >  
> >  import xen.lowlevel.xc
> > @@ -1541,6 +1542,9 @@ class XendDomainInfo:
> >              return sxpr
> >  
> >          except RuntimeError, exn:
> > +            # Domain already died.
> > +            if exn.args[0] == errno.ESRCH:
> > +                return sxpr
> >              raise XendError(str(exn))
> >  
> >  
> 
> Adding Matt as he has stepped up to be the bug-fix maintainer of Xend
> (I think? Is that correct - should that be reflected in the MAINTAINERS file?)

This should probably be handling xen.lowlevel.xc.Error. There's no
guarantee that a RuntimeError will have arguments, though
xen.lowlevel.xc.Error seems to always be constructed with arguments.

--msw

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.