From: Kouya Shimura Subject: [PATCH] xend: get rid of remains in xenstore Date: Mon, 30 Mar 2009 16:55:07 +0900 Message-ID: <7k8wmn78dg.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fuu7jlEWoG" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --fuu7jlEWoG Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit The xenstore often holds remains of domain path. XendDomainInfo._storeChanged thread, which is watching the "/vm/", might run after XendDomainInfo.cleanupDomain is done by shutting down the domain. thus, the xenstore path "/local/domain/" is once removed but revived again. Signed-off-by: Kouya Shimura --fuu7jlEWoG Content-Type: text/x-patch Content-Disposition: inline; filename="fix_xenstore.patch" Content-Transfer-Encoding: 7bit diff -r e54eeff2de54 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri Mar 27 11:07:11 2009 +0900 +++ b/tools/python/xen/xend/XendDomainInfo.py Mon Mar 30 10:06:20 2009 +0900 @@ -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 --fuu7jlEWoG Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --fuu7jlEWoG--