Revert 21224:a7947fd90328 "xend: earlier remove the backend of tapdisk device"
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 23 Apr 2010 07:37:19 +0000 (08:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 23 Apr 2010 07:37:19 +0000 (08:37 +0100)
Consensus is that this is not the correct fix.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/xend/XendDomainInfo.py

index b8f7296a308291c3ce4962de6deb2d66da871973..dcf26a9886eef15460cea5fcbfd6cd2f2ea0b315 100644 (file)
@@ -2408,13 +2408,8 @@ class XendDomainInfo:
 
     def _releaseDevices(self, suspend = False):
         """Release all domain's devices.  Nothrow guarantee."""
-        t = xstransact("%s/device" % self.vmpath)
         if self.image:
             try:
-                for dev in t.list('tap'):
-                    log.debug("Early removing %s", dev);
-                    self.getDeviceController('tap').destroyDevice(dev, True)
-                time.sleep(0.1)
                 log.debug("Destroying device model")
                 self.image.destroyDeviceModel()
             except Exception, e:
@@ -2423,10 +2418,9 @@ class XendDomainInfo:
             log.debug("No device model")
 
         log.debug("Releasing devices")
+        t = xstransact("%s/device" % self.vmpath)
         try:
             for devclass in XendDevices.valid_devices():
-                if devclass is 'tap':
-                    continue
                 for dev in t.list(devclass):
                     try:
                         log.debug("Removing %s", dev);