Bug 475791 - [RHEL5.4]: libvirt/ virsh passes incorrect type=vbd when detaching TAP devices
Summary: [RHEL5.4]: libvirt/ virsh passes incorrect type=vbd when detaching TAP devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-10 14:46 UTC by Daniel Berrangé
Modified: 2009-12-14 21:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:19:59 UTC
Target Upstream Version:


Attachments (Terms of Use)
Use correct device type for xend attach/detach (578 bytes, text/plain)
2009-02-16 01:36 UTC, Cole Robinson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1269 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2009-09-01 09:31:21 UTC

Description Daniel Berrangé 2008-12-10 14:46:02 UTC
+++ This bug was initially created as a clone of Bug #473882 +++

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



This bug is to track fixing of libvirt's virDomainDeviceDetach operation for Xen TAP disk devices.

Comment 1 Cole Robinson 2009-02-16 00:14:42 UTC
Just to clarify, the original bug was against xen, and the patch referenced in the above comment was the xen patch. I'm not sure if there is any associated libvirt patch for RHEL or upstream.

The correct 'type' value mentioned above seems to be 'tap', not 'vbd'.

Comment 2 Cole Robinson 2009-02-16 01:36:59 UTC
Created attachment 331998 [details]
Use correct device type for xend attach/detach

I only build tested this. Applies against current upstream.

Comment 5 Daniel Veillard 2009-04-24 20:54:08 UTC
libvirt-0.6.3-1.el5 which was build in dist-5E-qu-candidate has the fix,

Daniel

Comment 8 Nan Zhang 2009-06-30 10:03:37 UTC
Verified with libvirt 0.6.3-11.el5 on RHEL-5.4. It's fixed, set status to VERIFIED.

[root@dhcp-66-70-85 ~]# virsh attach-disk xentest /var/lib/xen/images/test.img xvda --driver vbd
error: No support vbd in command 'attach-disk'

[root@dhcp-66-70-85 ~]# virsh attach-disk xentest /var/lib/xen/images/test.img xvda --driver tap
Disk attached successfully

Comment 10 errata-xmlrpc 2009-09-02 09:19:59 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/RHEA-2009-1269.html


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