ia64/xen-unstable

changeset 19512:71077a0fd289

xend: fix leak of /local/domain/* in xenstore

xenwatch thread _storeChanged() may create /local/domain/<domid>
entries in xenstore even after the domain has shutdown.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 07 10:14:35 2009 +0100 (2009-04-07)
parents accf139b2eb9
children 5c69f98c348e
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Apr 06 21:12:33 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Apr 07 10:14:35 2009 +0100
     1.3 @@ -1634,7 +1634,13 @@ class XendDomainInfo:
     1.4          if changed:
     1.5              # Update the domain section of the store, as this contains some
     1.6              # parameters derived from the VM configuration.
     1.7 -            self._storeDomDetails()
     1.8 +            self.refresh_shutdown_lock.acquire()
     1.9 +            try:
    1.10 +                state = self._stateGet()
    1.11 +                if state not in (DOM_STATE_SHUTDOWN, DOM_STATE_HALTED,):
    1.12 +                    self._storeDomDetails()
    1.13 +            finally:
    1.14 +                self.refresh_shutdown_lock.release()
    1.15  
    1.16          return 1
    1.17