xend: destroy restored domain when its device doesn't exist

A migrated domain keeps on running even though its disk doesn't
exist. This situation must be undesirable.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2010-01-27 08:59:47 +00:00
1 parent fd607bf000
commit 4dc7c3daba
1 file changed
+6 -7
+6 -7
View File
@@ -344,19 +344,18 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False):
try:
dominfo.waitForDevices() # Wait for backends to set up
except Exception, exn:
log.exception(exn)
if lock:
XendDomain.instance().domains_lock.acquire()
finally:
if lock:
XendDomain.instance().domains_lock.acquire()
if not paused:
dominfo.unpause()
return dominfo
except:
except Exception, exn:
dominfo.destroy()
raise
log.exception(exn)
raise exn
class RestoreInputHandler:
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.