mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Only remove domain from store once it's suspended.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
ce27fde65d
commit
0c97488f1e
1 file changed
+2
-2
@@ -70,6 +70,8 @@ def save(xd, fd, dominfo, live):
|
||||
if l.rstrip() == "suspend":
|
||||
log.info("suspending %d" % dominfo.id)
|
||||
xd.domain_shutdown(dominfo.id, reason='suspend')
|
||||
dominfo.state_wait("suspended")
|
||||
log.info("suspend %d done" % dominfo.id)
|
||||
if dominfo.store_channel:
|
||||
try:
|
||||
dominfo.db.releaseDomain(dominfo.id)
|
||||
@@ -78,8 +80,6 @@ def save(xd, fd, dominfo, live):
|
||||
"error in domain release on xenstore: %s",
|
||||
ex)
|
||||
pass
|
||||
dominfo.state_wait("suspended")
|
||||
log.info("suspend %d done" % dominfo.id)
|
||||
child.tochild.write("done\n")
|
||||
child.tochild.flush()
|
||||
if filter(lambda (fd, event): event & select.POLLHUP, r):
|
||||
|
||||