ia64/xen-unstable

changeset 12078:c11e827d6ac6

[XEND] Clean up some keyword clashes with XendCheckpoint
- Replaced str with domstr
- Disabled changing domain name while migrating

Signed-off-by: Alastair Tse <atse@xensource.com>
author acnt2@huggins.lce.cl.cam.ac.uk
date Thu Oct 05 17:29:19 2006 +0100 (2006-10-05)
parents 48c5a79c4fbf
children 32d074ff02ee
files tools/python/xen/xend/XendCheckpoint.py
line diff
     1.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Thu Oct 05 17:29:19 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Thu Oct 05 17:29:19 2006 +0100
     1.3 @@ -40,13 +40,13 @@ def write_exact(fd, buf, errmsg):
     1.4  def read_exact(fd, size, errmsg):
     1.5      buf  = '' 
     1.6      while size != 0: 
     1.7 -        str = os.read(fd, size)
     1.8 -        if not len(str):
     1.9 +        readstr = os.read(fd, size)
    1.10 +        if not len(readstr):
    1.11              log.error("read_exact: EOF trying to read %d (buf='%s')" % \
    1.12                        (size, buf))
    1.13              raise XendError(errmsg)
    1.14 -        size = size - len(str)
    1.15 -        buf  = buf + str
    1.16 +        size = size - len(readstr)
    1.17 +        buf  = buf + readstr
    1.18      return buf
    1.19  
    1.20  
    1.21 @@ -60,7 +60,9 @@ def save(fd, dominfo, network, live, dst
    1.22      # Rename the domain temporarily, so that we don't get a name clash if this
    1.23      # domain is migrating (live or non-live) to the local host.  Doing such a
    1.24      # thing is useful for debugging.
    1.25 -    dominfo.setName('migrating-' + domain_name)
    1.26 +    #
    1.27 +    # FIXME: I don't think this is such a good idea - atse@xensource.com
    1.28 +    #dominfo.setName('migrating-' + domain_name)
    1.29  
    1.30      try:
    1.31          dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP1, domain_name)
    1.32 @@ -101,10 +103,10 @@ def save(fd, dominfo, network, live, dst
    1.33      except Exception, exn:
    1.34          log.exception("Save failed on domain %s (%d).", domain_name,
    1.35                        dominfo.getDomid())
    1.36 -        try:
    1.37 -            dominfo.setName(domain_name)
    1.38 -        except:
    1.39 -            log.exception("Failed to reset the migrating domain's name")
    1.40 +        #try:
    1.41 +        #    dominfo.setName(domain_name)
    1.42 +        #except:
    1.43 +        #    log.exception("Failed to reset the migrating domain's name")
    1.44          raise Exception, exn
    1.45  
    1.46