ia64/xen-unstable

changeset 12312:2408c042a276

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>
author Ewan Mellor <ewan@xensource.com>
date Wed Nov 08 11:13:50 2006 +0000 (2006-11-08)
parents 5c5b03381d3c
children 695393d30ead
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Wed Nov 08 11:08:18 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed Nov 08 11:13:50 2006 +0000
     1.3 @@ -769,6 +769,8 @@ class XendDomain:
     1.4          """
     1.5          self.domains_lock.acquire()
     1.6          try:
     1.7 +            self._refresh()
     1.8 +
     1.9              dominfo = XendDomainInfo.create(config)
    1.10              self._add_domain(dominfo)
    1.11              self.domain_sched_credit_set(dominfo.getDomid(),
    1.12 @@ -815,6 +817,8 @@ class XendDomain:
    1.13          """
    1.14          self.domains_lock.acquire()
    1.15          try:
    1.16 +            self._refresh()
    1.17 +
    1.18              dominfo = self.domain_lookup_nr(domid)
    1.19              if not dominfo:
    1.20                  raise XendInvalidDomain(str(domid))
    1.21 @@ -824,7 +828,6 @@ class XendDomain:
    1.22              
    1.23              dominfo.start(is_managed = True)
    1.24  
    1.25 -            
    1.26          finally:
    1.27              self.domains_lock.release()
    1.28