mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
fd607bf000
commit
4dc7c3daba
1 file changed
+6
-7
@@ -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:
|
||||
|
||||