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

[Xen-changelog] Remove the diagnostic/recovery when two domains end up with the same name. It



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID cd6f7b548218b22aff3dd7a5607b222864e49727
# Parent  92c6021f23e4bb7fe1254f21d6a24d07d62f0e54
Remove the diagnostic/recovery when two domains end up with the same name.  It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 92c6021f23e4 -r cd6f7b548218 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Oct 13 14:26:44 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Oct 13 16:49:56 2005
@@ -313,18 +313,11 @@
     def domain_lookup_by_name_nr(self, name):
         self.domains_lock.acquire()
         try:
-            matching = filter(
-                lambda d: d.getName() == name and not d.isShutdown(),
-                self.domains.values())
+            matching = filter(lambda d: d.getName() == name,
+                              self.domains.values())
             n = len(matching)
             if n == 1:
                 return matching[0]
-            elif n > 1:
-                log.error('Name uniqueness has been violated for name %s!  '
-                          'Recovering by renaming:', name)
-                for d in matching:
-                    d.renameUniquely()
-
             return None
         finally:
             self.domains_lock.release()
diff -r 92c6021f23e4 -r cd6f7b548218 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 13 14:26:44 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 13 16:49:56 2005
@@ -836,14 +836,6 @@
         try:
             while self.state == STATE_DOM_OK:
                 self.state_updated.wait()
-        finally:
-            self.state_updated.release()
-
-
-    def isShutdown(self):
-        self.state_updated.acquire()
-        try:
-            return self.state == STATE_DOM_SHUTDOWN
         finally:
             self.state_updated.release()
 
@@ -1292,20 +1284,6 @@
         self.state_set(STATE_DOM_SHUTDOWN)
 
 
-    ## public:
-
-    def renameUniquely(self):
-        """Rename this domain so that it has a unique name.  This is used by
-        XendDomain to recover from non-uniqueness errors; we should never have
-        allowed the system to reach this state in the first place."""
-        new_name = self.generateUniqueName()
-        
-        log.error('Renaming %s (%d, %s) to %s', self.info['name'], self.domid,
-                  self.uuid, new_name)
-
-        self.setName(new_name)
-
-
     # private:
 
     def generateUniqueName(self):

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


 


Rackspace

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