RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 597998 - [NPIV] node device vHBA isn't really destroyed
Summary: [NPIV] node device vHBA isn't really destroyed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dave Allan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 608701 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-31 08:23 UTC by Nan Zhang
Modified: 2018-10-27 10:44 UTC (History)
7 users (show)

Fixed In Version: libvirt-0_8_1-10_el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:49:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nan Zhang 2010-05-31 08:23:02 UTC
Description of problem:
node device can't be destroyed.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-6.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
# virsh nodedev-dumpxml scsi_host7
<device>
  <name>scsi_host7</name>
  <parent>computer</parent>
  <capability type='scsi_host'>
    <host>7</host>
    <capability type='fc_host'>
      <wwnn>2001001b32a9f25b</wwnn>
      <wwpn>2101001b32a90002</wwpn>
    </capability>
  </capability>
</device>

# virsh nodedev-destroy scsi_host7
Destroyed node device 'scsi_host7'

# ls /sys/class/fc_host/
host4  host5  host6  host7
  
Actual results:
device cannot be destroyed.

Expected results:
device can be destroyed.

Additional info:
Can workaround by following command.
# echo '2101001b32a90002:2001001b32a9f25b' > /sys/class/fc_host/host5/vport_delete 
# ls /sys/class/fc_host/
host4  host5  host6

Comment 2 Daniel Berrangé 2010-06-02 10:41:09 UTC
This is bad because libvirt reported that the device was successfully destroyed, but it didn't actually go away.

Comment 3 Dave Allan 2010-06-02 14:36:05 UTC
There are really two bugs here.  One is the failure to destroy the vHBA, which is a dup of 593995.  The destroy operation goes to look up the parent, finds "computer", realizes that it can't issue a destroy operation to it, and fails.  I have already submitted a patch upstream to fix this problem.

The other bug is that nodeDeviceDestroy does not set its return value correctly on failure.  I have a patch which I will be submitting upstream today.

Comment 4 Dave Allan 2010-06-03 19:38:29 UTC
The upstream patch was ack'd and I pushed it earlier today, commit d3e43bad98e3f95408203859bb4165f3b9b10d5b

Comment 5 RHEL Program Management 2010-06-07 15:55:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 7 Dave Allan 2010-06-23 21:30:32 UTC
libvirt-0_8_1-10_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 8 wangyimiao 2010-06-25 09:38:05 UTC
Verified this bug PASS with libvirt-0.8.1-10.el6.x86_64
- kernel-2.6.32-36.el6.x86_64
- qemu-img-0.12.1.2-2.80.el6.x86_64
- qemu-kvm-0.12.1.2-2.80.el6.x86_64

Comment 9 Dave Allan 2010-06-29 15:38:07 UTC
*** Bug 608701 has been marked as a duplicate of this bug. ***

Comment 10 Issue Tracker 2010-06-29 17:44:39 UTC
Event posted on 06-29-2010 12:22pm EDT by Glen Johnson

------- Comment From lnx1138.ibm.com 2010-06-29 12:14 EDT-------
Thanks for the update! From the other bug, the upstream change is
http://libvirt.org/git/?p=libvirt.git;a=commit;h=d3e43bad98e3f95408203859bb4165f3b9b10d5b

Can you provide snapshot that the updated libvirt is targeted for please?


This event sent from IssueTracker by jkachuck 
 issue 1068533

Comment 11 Issue Tracker 2010-06-29 20:14:58 UTC
Event posted on 06-29-2010 03:43pm EDT by Glen Johnson

------- Comment From maknayak.com 2010-06-29 15:35 EDT-------
(In reply to comment #19)
(In reply to comment #20)

Hi All,
I downloaded following libvirt-0.8.1-11.el6.x86_64 rpms from the link
"people.redhat.com/~dallan" mentioned on comment# 19 ,installed on one
of the pre-beta2 x86_64 system , verified by virsh command
from command line and did not reproduce the error again.

--- Installed libvirt components ----
libvirt-0.8.1-11.el6.x86_64.rpm
libvirt-client-0.8.1-11.el6.x86_64.rpm
libvirt-debuginfo-0.8.1-11.el6.x86_64.rpm
libvirt-devel-0.8.1-11.el6.x86_64.rpm
libvirt-python-0.8.1-11.el6.x86_64.rpm

--- Here is the testing output ---

Before vport creation:

[root@elm3c93 manas]# lsscsi
[2:0:0:0]    enclosu IBM      SAS SES-2 DEVICE 2.06  -
[2:2:0:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sda
[2:2:1:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdb
[2:2:2:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdc
[2:2:3:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdd
[3:0:0:0]    disk    IBM      1726-4xx  FAStT  0617  -
[4:0:1:0]    disk    IBM      1726-4xx  FAStT  0617  /dev/sde
[4:0:1:1]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdf
[4:0:1:2]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdg
[4:0:1:3]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdh
[4:0:1:4]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdi
[4:0:1:5]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdj
[4:0:1:6]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdk
[4:0:1:7]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdl

[root@elm3c93 manas]# virsh nodedev-create virtualhba.xml
Node device scsi_host15 created from virtualhba.xml

--- output from /var/log/messages ---
Jun 29 16:18:30 elm3c93 kernel: qla2xxx 0000:0c:00.0: VP entry id 1
assigned.
Jun 29 16:18:30 elm3c93 kernel: scsi15 : qla2xxx
Jun 29 16:18:30 elm3c93 kernel: scsi host3: vport-3:0-9 created via shost3
channel 0
Jun 29 16:18:32 elm3c93 kernel: scsi 15:0:0:0: Direct-Access   IBM
1726-4xx  FAStT  0617 PQ: 0 ANSI: 5
Jun 29 16:18:32 elm3c93 kernel: sd 15:0:0:0: [sdm] 16777216 512-byte
logical blocks: (8.58 GB/8.00 GiB)
Jun 29 16:18:32 elm3c93 kernel: sd 15:0:0:1: [sdn] 16777216 512-byte
logical blocks: (8.58 GB/8.00 GiB)
Jun 29 16:18:32 elm3c93 kernel: sd 15:0:0:2: [sdo] 16777216 512-byte
logical blocks: (8.58 GB/8.00 GiB)
Jun 29 16:18:32 elm3c93 kernel: sd 15:0:0:3: [sdp] 16777216 512-byte
logical blocks: (8.58 GB/8.00 GiB)

[root@elm3c93 manas]# lsscsi
[2:0:0:0]    enclosu IBM      SAS SES-2 DEVICE 2.06  -
[2:2:0:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sda
[2:2:1:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdb
[2:2:2:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdc
[2:2:3:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdd
[3:0:0:0]    disk    IBM      1726-4xx  FAStT  0617  -
[4:0:1:0]    disk    IBM      1726-4xx  FAStT  0617  /dev/sde
[4:0:1:1]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdf
[4:0:1:2]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdg
[4:0:1:3]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdh
[4:0:1:4]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdi
[4:0:1:5]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdj
[4:0:1:6]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdk
[4:0:1:7]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdl
[15:0:0:0]   disk    IBM      1726-4xx  FAStT  0617  /dev/sdm
[15:0:0:1]   disk    IBM      1726-4xx  FAStT  0617  /dev/sdn
[15:0:0:2]   disk    IBM      1726-4xx  FAStT  0617  /dev/sdo
[15:0:0:3]   disk    IBM      1726-4xx  FAStT  0617  /dev/sdp

[root@elm3c93 manas]# virsh nodedev-destroy scsi_host15
Destroyed node device 'scsi_host15'

--- output from /var/log/messages ---
Jun 29 16:18:53 elm3c93 kernel: qla2xxx 0000:0c:00.0: vport 1 deleted
Jun 29 16:19:02 elm3c93 kernel: rport-3:0-5: blocked FC remote port time
out: removing rport

[root@elm3c93 manas]# lsscsi
[2:0:0:0]    enclosu IBM      SAS SES-2 DEVICE 2.06  -
[2:2:0:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sda
[2:2:1:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdb
[2:2:2:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdc
[2:2:3:0]    disk    IBM      ServeRAID-MR10k  1.12  /dev/sdd
[3:0:0:0]    disk    IBM      1726-4xx  FAStT  0617  -
[4:0:1:0]    disk    IBM      1726-4xx  FAStT  0617  /dev/sde
[4:0:1:1]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdf
[4:0:1:2]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdg
[4:0:1:3]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdh
[4:0:1:4]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdi
[4:0:1:5]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdj
[4:0:1:6]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdk
[4:0:1:7]    disk    IBM      1726-4xx  FAStT  0617  /dev/sdl

I repeated above execution several times and it worked perfectly without
any issue.
libvirt-0.8.1-11.el6 has fix for this issue.

Thanks...
Manas


This event sent from IssueTracker by jkachuck 
 issue 1068533

Comment 12 Dave Allan 2010-06-30 02:36:48 UTC
Thanks for the verification; this fix should be in snap 7.

Comment 14 releng-rhel@redhat.com 2010-11-11 14:49:24 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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