ia64/xen-unstable
changeset 7381:cd6f7b548218
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@xensource.com>
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@xensource.com>
author | emellor@leeni.uk.xensource.com |
---|---|
date | Thu Oct 13 17:49:56 2005 +0100 (2005-10-13) |
parents | 92c6021f23e4 |
children | bb22622a15fc |
files | tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomain.py Thu Oct 13 15:26:44 2005 +0100 1.2 +++ b/tools/python/xen/xend/XendDomain.py Thu Oct 13 17:49:56 2005 +0100 1.3 @@ -313,18 +313,11 @@ class XendDomain: 1.4 def domain_lookup_by_name_nr(self, name): 1.5 self.domains_lock.acquire() 1.6 try: 1.7 - matching = filter( 1.8 - lambda d: d.getName() == name and not d.isShutdown(), 1.9 - self.domains.values()) 1.10 + matching = filter(lambda d: d.getName() == name, 1.11 + self.domains.values()) 1.12 n = len(matching) 1.13 if n == 1: 1.14 return matching[0] 1.15 - elif n > 1: 1.16 - log.error('Name uniqueness has been violated for name %s! ' 1.17 - 'Recovering by renaming:', name) 1.18 - for d in matching: 1.19 - d.renameUniquely() 1.20 - 1.21 return None 1.22 finally: 1.23 self.domains_lock.release()
2.1 --- a/tools/python/xen/xend/XendDomainInfo.py Thu Oct 13 15:26:44 2005 +0100 2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Oct 13 17:49:56 2005 +0100 2.3 @@ -840,14 +840,6 @@ class XendDomainInfo: 2.4 self.state_updated.release() 2.5 2.6 2.7 - def isShutdown(self): 2.8 - self.state_updated.acquire() 2.9 - try: 2.10 - return self.state == STATE_DOM_SHUTDOWN 2.11 - finally: 2.12 - self.state_updated.release() 2.13 - 2.14 - 2.15 def __str__(self): 2.16 s = "<domain" 2.17 s += " id=" + str(self.domid) 2.18 @@ -1292,20 +1284,6 @@ class XendDomainInfo: 2.19 self.state_set(STATE_DOM_SHUTDOWN) 2.20 2.21 2.22 - ## public: 2.23 - 2.24 - def renameUniquely(self): 2.25 - """Rename this domain so that it has a unique name. This is used by 2.26 - XendDomain to recover from non-uniqueness errors; we should never have 2.27 - allowed the system to reach this state in the first place.""" 2.28 - new_name = self.generateUniqueName() 2.29 - 2.30 - log.error('Renaming %s (%d, %s) to %s', self.info['name'], self.domid, 2.31 - self.uuid, new_name) 2.32 - 2.33 - self.setName(new_name) 2.34 - 2.35 - 2.36 # private: 2.37 2.38 def generateUniqueName(self):