Skip to contentSkip to conversation

xend: get rid of remains in xenstore

PATCH New Kouya Shimura 1 participant 1 message Mar 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: get rid of remains in xenstore

The xenstore often holds remains of domain path. XendDomainInfo._storeChanged thread, which is watching the "/vm/<uuid>", might run after XendDomainInfo.cleanupDomain is done by shutting down the domain. thus, the xenstore path "/local/domain/<domid>" is once removed but revived again.

tools/python/xen/xend/XendDomainInfo.py +7 -1
diff -r e54eeff2de54 tools/python/xen/xend/XendDomainInfo.py
@@ -1629,7 +1629,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:
+                # Check if the domain is shutting down
+                if self.domid != None:
+                    self._storeDomDetails()
+            finally:
+                self.refresh_shutdown_lock.release()
 
         return 1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel