mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
d1e3da560b
commit
3756da027a
1 file changed
+4
-1
@@ -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()
|
||||
|
||||
|
||||