Adding max block device timeout of 30 secs for live migrate.

This commit is contained in:
jchesterfield@wicket.uk.xensource.com committed 2006-09-15 18:48:24 +01:00
1 parent 68043a01dc
commit 551365b6a0
1 file changed
+6
+6
View File
@@ -86,6 +86,7 @@ STATE_DOM_OK = 1
STATE_DOM_SHUTDOWN = 2
SHUTDOWN_TIMEOUT = 30.0
MIGRATE_TIMEOUT = 30.0
ZOMBIE_PREFIX = 'Zombie-'
@@ -1535,8 +1536,10 @@ class XendDomainInfo:
the device has shutdown correctly, i.e. all blocks are
flushed to disk
"""
start = time.time()
while True:
test = 0
diff = time.time() - start
for i in self.getDeviceController('vbd').deviceIDs():
test = 1
log.info("Dev %s still active, looping...", i)
@@ -1544,6 +1547,9 @@ class XendDomainInfo:
if test == 0:
break
if diff >= MIGRATE_TIMEOUT:
log.info("Dev still active but hit max loop timeout")
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.