Bug 473882 - [RHEL5.3]: xm block-detach no longer works
Summary: [RHEL5.3]: xm block-detach no longer works
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Chris Lalancette
QA Contact: Gurhan Ozen
URL:
Whiteboard:
: 475588 (view as bug list)
Depends On:
Blocks: 465937 465938 475588
TreeView+ depends on / blocked
 
Reported: 2008-12-01 10:12 UTC by Chris Lalancette
Modified: 2018-10-20 02:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:13:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix up block detach (1.83 KB, patch)
2008-12-02 12:16 UTC, Chris Lalancette
no flags Details | Diff
Correct fix for block-detach (1.69 KB, patch)
2008-12-10 14:41 UTC, Daniel Berrangé
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0118 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2009-01-20 16:04:49 UTC

Description Chris Lalancette 2008-12-01 10:12:09 UTC
Description of problem:
As reported by Don Dutile, xm block-detach no longer seems to work in the RHEL 5.3 beta.  The following sequence of actions:

# xm create -c rhel5pv_x86_64
# xm block-attach rhel5pv_x86_64 tap:aio:/var/lib/xen/images/test.dsk /dev/xvde w
# xm block-detach rhel5pv_x86_64 51776

Results in:

   Error: 51776 not connected
   Usage: xm block-detach <Domain> <DevId> [-f|--force]

   Destroy a domain's virtual block device.

Doing a bisection, this seems to have started with xen-3.0.3-74.el5; prior to that, xm block-detach seemed to work fine.

Comment 2 Chris Lalancette 2008-12-02 12:15:40 UTC
OK, I think I got it.  The patch to fix up a CVE caused this breakage by moving some stuff around in xenstore.  Luckily, I think it is pretty easy to fix; the attached patch seems to fix it for me.  I'll post this upstream as well, since I think the same problem probably exists there.

Chris Lalancette

Comment 3 Chris Lalancette 2008-12-02 12:16:15 UTC
Created attachment 325364 [details]
Fix up block detach

Comment 5 Daniel Berrangé 2008-12-03 20:45:11 UTC
Built into xen-3.0.3-78.el5

Comment 7 Daniel Berrangé 2008-12-10 14:38:57 UTC
This patch caused a regression in guest reboots for bz 471588

Comment 8 Daniel Berrangé 2008-12-10 14:41:18 UTC
Created attachment 326512 [details]
Correct fix for block-detach

There are two core problems with block detach

 - virsh & xm both pass 'type=vbd' even for TAP devices. This causes the wrong device controller to be used. This is the cause of the detach failure. This patch checks for the bogus type=vbd and fixes it

 - The /vm/$UUID/device/{vbd,tap}/$DEVID  path is not removed from xenstore, preventing a later re-attachment. This patch removes that path upon detach

Comment 10 Bill Burns 2008-12-10 20:47:17 UTC
*** Bug 475588 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2009-01-20 21:13:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0118.html


Note You need to log in before you can comment on or make changes to this bug.