All of lore.kernel.org
 help / color / mirror / Atom feed
* xm block-detach fails for blktap devices (temporary solution)
@ 2006-08-18 19:48 Andres Lagar Cavilla
  0 siblings, 0 replies; only message in thread
From: Andres Lagar Cavilla @ 2006-08-18 19:48 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

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

[-- Attachment #2: XendDomainInfo.py.patch --]
[-- Type: text/x-patch, Size: 546 bytes --]

--- 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):

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-18 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18 19:48 xm block-detach fails for blktap devices (temporary solution) Andres Lagar Cavilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.