Bug 475791 - [RHEL5.4]: libvirt/ virsh passes incorrect type=vbd when detaching TAP devices
[RHEL5.4]: libvirt/ virsh passes incorrect type=vbd when detaching TAP devices
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.3
All Linux
high Severity high
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-10 09:46 EST by Daniel Berrange
Modified: 2009-12-14 16:05 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:19:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Daniel Berrange 2008-12-10 09:46:02 EST
+++ 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-15 19:14:42 EST
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-15 20:36:59 EST
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 16:54:08 EDT
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 06:03:37 EDT
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 05:19:59 EDT
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.