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>
This commit is contained in:
Keir Fraser committed 2009-04-07 10:14:35 +01:00
1 parent e6e6785c99
commit 94bacaf76d
1 file changed
+7 -1
+7 -1
View File
@@ -1634,7 +1634,13 @@ class XendDomainInfo:
if changed:
# Update the domain section of the store, as this contains some
# parameters derived from the VM configuration.
self._storeDomDetails()
self.refresh_shutdown_lock.acquire()
try:
state = self._stateGet()
if state not in (DOM_STATE_SHUTDOWN, DOM_STATE_HALTED,):
self._storeDomDetails()
finally:
self.refresh_shutdown_lock.release()
return 1
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.