xend: Test tap devices in testDeviceComplete()
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 11 Mar 2009 10:10:15 +0000 (10:10 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 11 Mar 2009 10:10:15 +0000 (10:10 +0000)
XendDomainInfo.testDeviceComplete() should check block devices have
shutdown correctly but it only considers vbd class devices and ignores
tap devices. The attached patch changes testDeviceComplete() to wait
for both vbd and tap devices to be shutdown correctly.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
tools/python/xen/xend/XendDomainInfo.py

index bb0b7f23cb477b9c9424f88195895767bb82f005..88a2c2f5eb3d086f4cbe038374f551629c177ae6 100644 (file)
@@ -2888,7 +2888,9 @@ class XendDomainInfo:
         while True:
             test = 0
             diff = time.time() - start
-            for i in self.getDeviceController('vbd').deviceIDs():
+            vbds = self.getDeviceController('vbd').deviceIDs()
+            taps = self.getDeviceController('tap').deviceIDs()
+            for i in vbds + taps:
                 test = 1
                 log.info("Dev %s still active, looping...", i)
                 time.sleep(0.1)