[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.1-testing] Fix save/restore failure cleanup
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1202134937 0 # Node ID d537f1a3ed775e9ed4c17147123b41ede5760a0b # Parent 4616674ead56a8df30f1b8c59f56d2dc3fb6d70c Fix save/restore failure cleanup The save failure cleanup introduced in 13543:207523704fb1 is incorrect: if we didn't get as far as actually suspending the domain, then the guest domain will not be expecting the devices to be removed (seen on both Linux and Solaris, which don't expect a 'Closing' state when they hold the device open). Only re-jig devices if we definitely shut the domain down. Signed-off-by: John Levon <john.levon@xxxxxxx> xen-unstable changeset: 16964:5d84464dc1fc013110c25dc0ff1f99585e699fa3 xen-unstable date: Sat Feb 02 10:51:54 2008 +0000 --- tools/python/xen/xend/XendCheckpoint.py | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff -r 4616674ead56 -r d537f1a3ed77 tools/python/xen/xend/XendCheckpoint.py --- a/tools/python/xen/xend/XendCheckpoint.py Mon Feb 04 14:20:07 2008 +0000 +++ b/tools/python/xen/xend/XendCheckpoint.py Mon Feb 04 14:22:17 2008 +0000 @@ -66,6 +66,8 @@ def save(fd, dominfo, network, live, dst # thing is useful for debugging. dominfo.setName('migrating-' + domain_name) + done_suspend = 0 + try: dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP1, domain_name) @@ -93,6 +95,7 @@ def save(fd, dominfo, network, live, dst log.debug("Suspending %d ...", dominfo.getDomid()) dominfo.shutdown('suspend') dominfo.waitForShutdown() + done_suspend = 1 dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2, domain_name) log.info("Domain %d suspended.", dominfo.getDomid()) @@ -139,8 +142,13 @@ def save(fd, dominfo, network, live, dst log.exception("Save failed on domain %s (%s).", domain_name, dominfo.getDomid()) - dominfo.resumeDomain() - log.debug("XendCheckpoint.save: resumeDomain") + # If we didn't get as far as suspending the domain (for + # example, we couldn't balloon enough memory for the new + # domain), then we don't want to re-plumb the devices, as the + # domU will not be expecting it. + if done_suspend: + log.debug("XendCheckpoint.save: resumeDomain") + dominfo.resumeDomain() try: dominfo.setName(domain_name) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |