# HG changeset patch
# User acnt2@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID c11e827d6ac647b255919deaf369e8a3b863e6c3
# Parent 48c5a79c4fbf7ef1472cbf2f95bd2f4f42f3c9fc
[XEND] Clean up some keyword clashes with XendCheckpoint
- Replaced str with domstr
- Disabled changing domain name while migrating
Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendCheckpoint.py | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff -r 48c5a79c4fbf -r c11e827d6ac6 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/xend/XendCheckpoint.py Thu Oct 05 17:29:19 2006 +0100
@@ -40,13 +40,13 @@ def read_exact(fd, size, errmsg):
def read_exact(fd, size, errmsg):
buf = ''
while size != 0:
- str = os.read(fd, size)
- if not len(str):
+ readstr = os.read(fd, size)
+ if not len(readstr):
log.error("read_exact: EOF trying to read %d (buf='%s')" % \
(size, buf))
raise XendError(errmsg)
- size = size - len(str)
- buf = buf + str
+ size = size - len(readstr)
+ buf = buf + readstr
return buf
@@ -60,7 +60,9 @@ def save(fd, dominfo, network, live, dst
# Rename the domain temporarily, so that we don't get a name clash if this
# domain is migrating (live or non-live) to the local host. Doing such a
# thing is useful for debugging.
- dominfo.setName('migrating-' + domain_name)
+ #
+ # FIXME: I don't think this is such a good idea - atse@xxxxxxxxxxxxx
+ #dominfo.setName('migrating-' + domain_name)
try:
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP1, domain_name)
@@ -101,10 +103,10 @@ def save(fd, dominfo, network, live, dst
except Exception, exn:
log.exception("Save failed on domain %s (%d).", domain_name,
dominfo.getDomid())
- try:
- dominfo.setName(domain_name)
- except:
- log.exception("Failed to reset the migrating domain's name")
+ #try:
+ # dominfo.setName(domain_name)
+ #except:
+ # log.exception("Failed to reset the migrating domain's name")
raise Exception, exn
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|