direct-io.hg

changeset 7243:7079bb72ceca

Rename the source domain on migration, regardless of the live flag. This fixes
localhost non-live migration, and bug #297.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Fri Oct 07 10:58:41 2005 +0100 (2005-10-07)
parents 48df3efaf61c
children a6420243710d
files tools/python/xen/xend/XendCheckpoint.py
line diff
     1.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Fri Oct 07 00:21:00 2005 +0100
     1.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Fri Oct 07 10:58:41 2005 +0100
     1.3 @@ -48,9 +48,10 @@ def save(fd, dominfo, live):
     1.4      config = sxp.to_string(dominfo.sxpr())
     1.5  
     1.6      domain_name = dominfo.getName()
     1.7 -
     1.8 -    if live:
     1.9 -        dominfo.setName('migrating-' + domain_name)
    1.10 +    # Rename the domain temporarily, so that we don't get a name clash if this
    1.11 +    # domain is migrating (live or non-live) to the local host.  Doing such a
    1.12 +    # thing is useful for debugging.
    1.13 +    dominfo.setName('migrating-' + domain_name)
    1.14  
    1.15      try:
    1.16          write_exact(fd, pack("!i", len(config)),
    1.17 @@ -85,8 +86,7 @@ def save(fd, dominfo, live):
    1.18          log.exception("Save failed on domain %s (%d).", domain_name,
    1.19                        dominfo.getDomid())
    1.20          try:
    1.21 -            if live:
    1.22 -                dominfo.setName(domain_name)
    1.23 +            dominfo.setName(domain_name)
    1.24          except:
    1.25              log.exception("Failed to reset the migrating domain's name")
    1.26          raise Exception, exn