[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>
This commit is contained in:
acnt2@huggins.lce.cl.cam.ac.uk committed 2006-10-05 17:29:19 +01:00
1 parent 61c5734192
commit 80e180d5b3
1 file changed
+11 -9
+11 -9
View File
@@ -40,13 +40,13 @@ def write_exact(fd, buf, 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@xensource.com
#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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.