Refresh the domain list on domain_start or domain_create. We need to do this

so that the list of running domains is up-to-date for the name-uniqueness
check.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-11-08 11:13:50 +00:00
1 parent d1e3da560b
commit 3756da027a
1 file changed
+4 -1
+4 -1
View File
@@ -769,6 +769,8 @@ class XendDomain:
"""
self.domains_lock.acquire()
try:
self._refresh()
dominfo = XendDomainInfo.create(config)
self._add_domain(dominfo)
self.domain_sched_credit_set(dominfo.getDomid(),
@@ -815,6 +817,8 @@ class XendDomain:
"""
self.domains_lock.acquire()
try:
self._refresh()
dominfo = self.domain_lookup_nr(domid)
if not dominfo:
raise XendInvalidDomain(str(domid))
@@ -824,7 +828,6 @@ class XendDomain:
dominfo.start(is_managed = True)
finally:
self.domains_lock.release()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.