Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
In virsh.pod's doc , it says the command works on HBA , and when destroy a HBA with it , the error message doesn't make sense
Version-Release number of selected component (if applicable):
libvirt-1.1.1-12.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Basing on libvirt 1.1.1-12 branch , in virsh.pod line 2140 , nodedev-destroy part
Destroy (stop) a device on the host. I<device> can be either device
name or wwn pair in "wwnn,wwpn" format (only works for HBA). Note
that this makes libvirt quit managing a host device, and may even make
that device unusable by the rest of the physical host until a reboot.
2.Destroy a real HBA
# virsh nodedev-dumpxml scsi_host4
<device>
<name>scsi_host4</name>
<path>/sys/devices/pci0000:00/0000:00:0d.0/0000:04:00.0/host4</path>
<parent>pci_0000_04_00_0</parent>
<capability type='scsi_host'>
<host>4</host>
<capability type='fc_host'>
<wwnn>2000001b3289da4e</wwnn>
<wwpn>2100001b3289da4e</wwpn>
<fabric_wwn>2001000dec987841</fabric_wwn>
</capability>
<capability type='vport_ops'>
<max_vports>127</max_vports>
<vports>0</vports>
</capability>
</capability>
</device>
#virsh nodedev-destroy scsi_host4
error: Failed to destroy node device 'scsi_host4'
error: internal error: Parent device pci_0000_04_00_0 is not capable of vport operations
#virsh nodedev-list --cap scsi_host | grep 4
scsi_host4
Actual results:
Like the description and steps
Expected results:
If libvirt can't destroy a real HBA , both the doc and the error info should be more clear
Additional info:
One more thing ,
Will dumpxml a non-exist nodes error not exposed in terminal ?
Like
# virsh nodedev-dumpxml 1
error: Could not find matching device '1'
error: invalid node device pointer in virNodeDeviceFree <---here
commit ec2fb767bbd087c30b421b6c10eb2de25e90aa62
Author: Osier Yang <jyang>
Date: Fri Nov 22 20:55:25 2013 +0800
Doc: Explicitly declaring that nodedev-destroy only works for vHBA
Though trying to destroy a physical HBA doesn't make sense at all,
it's still a bit misleading with saying "only works for HBA".
Signed-off-by: Osier Yang <jyang>
v1.2.0-21-gec2fb76
verify version:
libvirt-1.2.8-10.el7.x86_64
install libvirt-1.2.8-10.el7.src.rpm
# vim src/libvirt.c
......
/**
* virNodeDeviceDestroy:
* @dev: a device object
*
* Destroy the device object. The virtual device (only works for vHBA
* currently) is removed from the host operating system. This function
* may require privileged access.
*
......
# vim tools/virsh.pod
......
name or wwn pair in "wwnn,wwpn" format (only works for vHBA currently).
Note that this makes libvirt quit managing a host device, and may even
make that device unusable by the rest of the physical host until a reboot.
......
move to verified.
verify in libvirt.org and man page :
check http://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceDestroy
......
Destroy the device object. The virtual device (only works for vHBA currently) is removed from the host operating system. This function may require privileged access.
......
check man page :
......
nodedev-destroy device
Destroy (stop) a device on the host. device can be either device name or wwn pair in "wwnn,wwpn" format (only works for vHBA currently). Note that this makes libvirt quit managing a host device, and may even make that device unusable by the rest of the physical host until a reboot.
......
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2015-0323.html
Description of problem: In virsh.pod's doc , it says the command works on HBA , and when destroy a HBA with it , the error message doesn't make sense Version-Release number of selected component (if applicable): libvirt-1.1.1-12.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Basing on libvirt 1.1.1-12 branch , in virsh.pod line 2140 , nodedev-destroy part Destroy (stop) a device on the host. I<device> can be either device name or wwn pair in "wwnn,wwpn" format (only works for HBA). Note that this makes libvirt quit managing a host device, and may even make that device unusable by the rest of the physical host until a reboot. 2.Destroy a real HBA # virsh nodedev-dumpxml scsi_host4 <device> <name>scsi_host4</name> <path>/sys/devices/pci0000:00/0000:00:0d.0/0000:04:00.0/host4</path> <parent>pci_0000_04_00_0</parent> <capability type='scsi_host'> <host>4</host> <capability type='fc_host'> <wwnn>2000001b3289da4e</wwnn> <wwpn>2100001b3289da4e</wwpn> <fabric_wwn>2001000dec987841</fabric_wwn> </capability> <capability type='vport_ops'> <max_vports>127</max_vports> <vports>0</vports> </capability> </capability> </device> #virsh nodedev-destroy scsi_host4 error: Failed to destroy node device 'scsi_host4' error: internal error: Parent device pci_0000_04_00_0 is not capable of vport operations #virsh nodedev-list --cap scsi_host | grep 4 scsi_host4 Actual results: Like the description and steps Expected results: If libvirt can't destroy a real HBA , both the doc and the error info should be more clear Additional info: