ia64/xen-unstable

changeset 17239:e678b42c36c4

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@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 18 11:34:44 2008 +0000 (2008-03-18)
parents 4ee7c6a4d193
children 3f407392da49
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Mar 18 11:32:06 2008 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Mar 18 11:34:44 2008 +0000
     1.3 @@ -2104,7 +2104,7 @@ class XendDomainInfo:
     1.4          self.state_updated.acquire()
     1.5          try:
     1.6              while self._stateGet() in (DOM_STATE_RUNNING,DOM_STATE_PAUSED):
     1.7 -                self.state_updated.wait()
     1.8 +                self.state_updated.wait(timeout=1.0)
     1.9          finally:
    1.10              self.state_updated.release()
    1.11