Block IO safety patch for live migration. Xend checks that VBDs are destroyed before unpausing the domain.

This commit is contained in:
jchesterfield@dhcp92.uk.xensource.com committed 2006-08-30 11:39:27 +01:00
1 parent 34784d695b
commit 458052b5ec
3 files changed
+21 -3

No files matched your search

+4 -2
View File
@@ -161,10 +161,12 @@ def restore(xd, fd):
if handler.store_mfn is None or handler.console_mfn is None:
raise XendError('Could not read store/console MFN')
#Block until src closes connection
os.read(fd, 1)
dominfo.unpause()
dominfo.completeRestore(handler.store_mfn, handler.console_mfn)
return dominfo
except:
dominfo.destroy()
+2 -1
View File
@@ -431,7 +431,8 @@ class XendDomain:
sock.send("receive\n")
sock.recv(80)
XendCheckpoint.save(sock.fileno(), dominfo, True, live, dst)
dominfo.testDeviceComplete()
sock.close()
def domain_save(self, domid, dst):
"""Start saving a domain to file.
+15
View File
@@ -1494,6 +1494,21 @@ class XendDomainInfo:
if rc != 0:
raise XendError("Device of type '%s' refuses migration." % n)
def testDeviceComplete(self):
""" For Block IO migration safety we must ensure that
the device has shutdown correctly, i.e. all blocks are
flushed to disk
"""
while True:
test = 0
for i in self.getDeviceController('vbd').deviceIDs():
test = 1
log.info("Dev %s still active, looping...", i)
time.sleep(0.1)
if test == 0:
break
def migrateDevices(self, network, dst, step, domName=''):
"""Notify the devices about migration
"""
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.