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:
cl349@firebug.cl.cam.ac.uk committed 2005-09-05 14:45:19 +00:00
1 parent ce27fde65d
commit 0c97488f1e
1 file changed
+2 -2
+2 -2
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.