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>
This commit is contained in:
emellor@ewan committed 2005-10-07 10:58:41 +01:00
1 parent 57e576dc3c
commit 1c7d85f77f
1 file changed
+5 -5
+5 -5
View File
@@ -48,9 +48,10 @@ def save(fd, dominfo, live):
config = sxp.to_string(dominfo.sxpr())
domain_name = dominfo.getName()
if live:
dominfo.setName('migrating-' + domain_name)
# 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)
try:
write_exact(fd, pack("!i", len(config)),
@@ -85,8 +86,7 @@ def save(fd, dominfo, live):
log.exception("Save failed on domain %s (%d).", domain_name,
dominfo.getDomid())
try:
if live:
dominfo.setName(domain_name)
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.