From: Andres Lagar Cavilla <andreslc@cs.toronto.edu>
To: xen-devel@lists.xensource.com
Subject: xm block-detach fails for blktap devices (temporary solution)
Date: Fri, 18 Aug 2006 15:48:39 -0400 [thread overview]
Message-ID: <44E61997.7040206@cs.toronto.edu> (raw)
[-- 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
reply other threads:[~2006-08-18 19:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44E61997.7040206@cs.toronto.edu \
--to=andreslc@cs.toronto.edu \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.