|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] xm block-detach fails for blktap devices (temporary solution)
Hi,as per the subject line, I'm unable to block-detach blktap devices (on unstable). Reason is, afaict, that xm_block_detach in python/xm/main.py passes 'vbd' as deviceClass, while blktap devices are added to the store with deviceClass = 'tap' The attached patch solves this problem in a rather rudimentary way. Andres --- XendDomainInfo.py 2006-08-17 17:17:46.000000000 -0400
+++ XendDomainInfo.py.new 2006-08-18 15:42:18.000000000 -0400
@@ -1078,7 +1078,13 @@
## public:
def destroyDevice(self, deviceClass, devid):
- return self.getDeviceController(deviceClass).destroyDevice(devid)
+ try:
+ return self.getDeviceController(deviceClass).destroyDevice(devid)
+ except VmError:
+ if deviceClass == 'vbd':
+ return self.getDeviceController('tap').destroyDevice(devid)
+ else:
+ raise
def getDeviceSxprs(self, deviceClass):
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |