mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Adding max block device timeout of 30 secs for live migrate.
This commit is contained in:
1 parent
68043a01dc
commit
551365b6a0
1 file changed
+6
@@ -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
|
||||
|
||||