ia64/xen-unstable

changeset 12643:bd5ebf33f222

Wait for device-bringup inside domain_start, outside the scope of the
domains_lock. This makes the VM.start call blocking, but allows xm list to
work while it is blocked. Move the handling of start_paused out of
XendDomainInfo.start as part of this.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Nov 28 18:00:45 2006 +0000 (2006-11-28)
parents 33951d547223
children 81c9213b3d39
files tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Tue Nov 28 17:28:43 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Tue Nov 28 18:00:45 2006 +0000
     1.3 @@ -908,10 +908,13 @@ class XendDomain:
     1.4              if dominfo.state != DOM_STATE_HALTED:
     1.5                  raise XendError("Domain is already running")
     1.6              
     1.7 -            dominfo.start(is_managed = True, start_paused = start_paused)
     1.8 +            dominfo.start(is_managed = True)
     1.9              self._add_domain(dominfo)
    1.10          finally:
    1.11              self.domains_lock.release()
    1.12 +        dominfo.waitForDevices()
    1.13 +        if not start_paused:
    1.14 +            dominfo.unpause()
    1.15          
    1.16  
    1.17      def domain_delete(self, domid):
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Nov 28 17:28:43 2006 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Nov 28 18:00:45 2006 +0000
     2.3 @@ -425,7 +425,7 @@ class XendDomainInfo:
     2.4      #
     2.5  
     2.6  
     2.7 -    def start(self, is_managed = False, start_paused = True):
     2.8 +    def start(self, is_managed = False):
     2.9          """Attempts to start the VM by do the appropriate
    2.10          initialisation if it not started.
    2.11          """
    2.12 @@ -439,8 +439,6 @@ class XendDomainInfo:
    2.13                  self._storeDomDetails()
    2.14                  self._registerWatches()
    2.15                  self.refreshShutdown()
    2.16 -                if not start_paused:
    2.17 -                    self.unpause()
    2.18  
    2.19                  # save running configuration if XendDomains believe domain is
    2.20                  # persistent