[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Adding max block device timeout of 30 secs for live migrate.



# HG changeset patch
# User jchesterfield@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID fe5c178cdf2e8a3dadb08fefe787d9c095ec2844
# Parent  6ca1a8ebfdf41bb595a8cc87c95885b601bd2f20
Adding max block device timeout of 30 secs for live migrate.
---
 tools/python/xen/xend/XendDomainInfo.py |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r 6ca1a8ebfdf4 -r fe5c178cdf2e tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Sep 15 11:17:26 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Sep 15 18:48:24 2006 +0100
@@ -86,6 +86,7 @@ STATE_DOM_SHUTDOWN = 2
 STATE_DOM_SHUTDOWN = 2
 
 SHUTDOWN_TIMEOUT = 30.0
+MIGRATE_TIMEOUT = 30.0
 
 ZOMBIE_PREFIX = 'Zombie-'
 
@@ -1535,14 +1536,19 @@ 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)
                 time.sleep(0.1)
                 
             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=''):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.