ia64/xen-unstable
changeset 11486:fe5c178cdf2e
Adding max block device timeout of 30 secs for live migrate.
author | jchesterfield@wicket.uk.xensource.com |
---|---|
date | Fri Sep 15 18:48:24 2006 +0100 (2006-09-15) |
parents | 6ca1a8ebfdf4 |
children | d59d6a440a41 |
files | tools/python/xen/xend/XendDomainInfo.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomainInfo.py Fri Sep 15 11:17:26 2006 +0100 1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Sep 15 18:48:24 2006 +0100 1.3 @@ -86,6 +86,7 @@ STATE_DOM_OK = 1 1.4 STATE_DOM_SHUTDOWN = 2 1.5 1.6 SHUTDOWN_TIMEOUT = 30.0 1.7 +MIGRATE_TIMEOUT = 30.0 1.8 1.9 ZOMBIE_PREFIX = 'Zombie-' 1.10 1.11 @@ -1535,8 +1536,10 @@ class XendDomainInfo: 1.12 the device has shutdown correctly, i.e. all blocks are 1.13 flushed to disk 1.14 """ 1.15 + start = time.time() 1.16 while True: 1.17 test = 0 1.18 + diff = time.time() - start 1.19 for i in self.getDeviceController('vbd').deviceIDs(): 1.20 test = 1 1.21 log.info("Dev %s still active, looping...", i) 1.22 @@ -1544,6 +1547,9 @@ class XendDomainInfo: 1.23 1.24 if test == 0: 1.25 break 1.26 + if diff >= MIGRATE_TIMEOUT: 1.27 + log.info("Dev still active but hit max loop timeout") 1.28 + break 1.29 1.30 def migrateDevices(self, network, dst, step, domName=''): 1.31 """Notify the devices about migration