Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 475791

Summary: [RHEL5.4]: libvirt/ virsh passes incorrect type=vbd when detaching TAP devices
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Berrangé <berrange>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: berrange, crobinso, ddutile, llim, nzhang, syeghiay, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:19:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use correct device type for xend attach/detach none

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