WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix domain suspend by xend stop

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix domain suspend by xend stop
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:40:36 -0700
Delivery-date: Thu, 20 Mar 2008 05:42:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205840084 0
# Node ID e678b42c36c45bc301d365d4d234216301fb11cc
# Parent  4ee7c6a4d193cc540505dee7b8d0e5cf038d60c8
Fix domain suspend by xend stop

When I stopped xend by xend stop command, a domain suspend processing
is frequently failed.  This patch solves the problem.

Step to reproduce:
 1. xm new XXX on_xend_stop="suspend"
 2. xm start XXX
 3. xend stop

In the xend stop, if the domain suspend processing is slept by
state_updated.wait() of waitForShutdown(), then the domain suspend
processing is not waked up again because state_updated.notifyAll()
of _stateSet() is not executed.

For the reason, processing of _on_domains_changed() is waited by
domains_lock.acquire() because the domain suspend processing is
keeping domains_lock and sleeping.  The domain suspend processing
got domains_lock at cleanup_domains().

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 4ee7c6a4d193 -r e678b42c36c4 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 18 11:32:06 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 18 11:34:44 2008 +0000
@@ -2104,7 +2104,7 @@ class XendDomainInfo:
         self.state_updated.acquire()
         try:
             while self._stateGet() in (DOM_STATE_RUNNING,DOM_STATE_PAUSED):
-                self.state_updated.wait()
+                self.state_updated.wait(timeout=1.0)
         finally:
             self.state_updated.release()
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix domain suspend by xend stop, Xen patchbot-unstable <=