debuggers.hg

changeset 20905:2f98b700605f

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 27 08:59:47 2010 +0000 (2010-01-27)
parents 2636e5619708
children b4244eff4384
files tools/python/xen/xend/XendCheckpoint.py
line diff
     1.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Tue Jan 26 15:54:40 2010 +0000
     1.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Wed Jan 27 08:59:47 2010 +0000
     1.3 @@ -344,19 +344,18 @@ def restore(xd, fd, dominfo = None, paus
     1.4  
     1.5          try:
     1.6              dominfo.waitForDevices() # Wait for backends to set up
     1.7 -        except Exception, exn:
     1.8 -            log.exception(exn)
     1.9 -
    1.10 -        if lock:
    1.11 -            XendDomain.instance().domains_lock.acquire()
    1.12 +        finally:
    1.13 +            if lock:
    1.14 +                XendDomain.instance().domains_lock.acquire()
    1.15  
    1.16          if not paused:
    1.17              dominfo.unpause()
    1.18  
    1.19          return dominfo
    1.20 -    except:
    1.21 +    except Exception, exn:
    1.22          dominfo.destroy()
    1.23 -        raise
    1.24 +        log.exception(exn)
    1.25 +        raise exn
    1.26  
    1.27  
    1.28  class RestoreInputHandler: