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

Re: [Xen-devel] An Introduction to the Xen-API Work



On Wed, Nov 08, 2006 at 10:34:24AM -0700, Jim Fehlig wrote:

> Stefan Berger wrote:
> >
> >This here solves the problem.
> >
> >diff -r 2408c042a276 tools/python/xen/xend/XendDomain.py
> >--- a/tools/python/xen/xend/XendDomain.py                 Wed Nov  8 
> >11:13:50 2006
> >+++ b/tools/python/xen/xend/XendDomain.py                 Wed Nov  8 
> >09:58:35 2006
> >@@ -472,7 +472,7 @@
> >        self.domains_lock.acquire()
> >        try:
> >            # lookup by name
> >-            match = [dom for dom in self.domains.values() \
> >+            match = [dom for dom in self.managed_domains.values() \
> >                     if dom.getName() == domid]
> >            if match:
> >                return match[0]
> >
> > Stefan
> 
> Ah, this is essentially the xend patch I was referring to in 
> http://lists.xensource.com/archives/html/xen-devel/2006-11/msg00361.html.  
> In domain_lookup_nr, it appears only 'non-inactive' domains are in the 
> domains dictionary, so this routine would not find the inactive domain 
> that I was attempting to destroy.  I took a slightly different approach 
> (patch attached), but given my knowledge of the code was not sure of any 
> potential side affects.  Also I wasn't sure why we are building a list 
> only to return the first item.  Why not return the item when found?  I 
> realize that names are not unique but the current code doesn't handle 
> duplicates anyway.
> 
> Ewan, can you comment on either of these patches?  This routine needs to 
> accommodate inactive domains as well.

Yes, we certainly need to include both lists here -- Stefan's patch breaks
other things unfortunately.  Your patch looks OK to me, though I'll give
Alastair time to comment -- he's worked on this more recently than me.

Ewan.

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


 


Rackspace

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