fix a HVM save/restore race condition after r15639
PATCH 1/1 fix a HVM save/restore race condition after r15639
Tim,
The qemu save command sending is moved from saveInputHandler to refreshShutdown(too late) in r15639, so higher possibility that control panel read a not ready qemu state file especially for live migration.
If reading happened before qemu create this file, a python missing file exception would occur. If before qemu put the record length in the file header as the last step, dest machine would try to restore a zero length qemu file to lead state lost in each device.
Attached patch can fix it, pls. have a look.
Thanks,
Signature · 2 lines
best rgds, edwin
Signed-off-by Zhai Edwin <[email protected]>
tools/python/xen/xend/XendCheckpoint.py +3 -0
@@ -98,6 +98,9 @@ def save(fd, dominfo, network, live, dst log.info("Domain %d suspended.", dominfo.getDomid()) dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP3, domain_name) + if hvm: + dominfo.image.saveDeviceModel() + tochild.write("done\n") tochild.flush() log.debug('Written done')
tools/python/xen/xend/XendDomainInfo.py +0 -2
@@ -1184,8 +1184,6 @@ class XendDomainInfo: self._clearRestart() if reason == 'suspend': - if self._stateGet() != DOM_STATE_SUSPENDED: - self.image.saveDeviceModel() self._stateSet(DOM_STATE_SUSPENDED) # Don't destroy the domain. XendCheckpoint will do # this once it has finished. However, stop watching
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel