Description of problem: After # virsh nodedev-destroy pci_****_***, then # virsh nodedev-list --tree, no output. It seems libvirtd is hanged Version-Release number of selected component (if applicable): libvirt-0.6.3-14.el5 RHEL5.4-Server-x86_64-xen kernel-xen-2.6.18-156.el5 How reproducible: 100% Steps to Reproduce: 1.# virsh nodedev-list --tree computer | +-pci_8086_10bd | | | +-net_00_1e_4f_a8_ee_27 | +-pci_8086_244e +-pci_8086_2914 ................ 2. # virsh nodedev-destroy pci_8086_10bd Destroyed node device 'pci_8086_10bd' 3. # virsh nodedev-list --tree <no output> Actual results: After step3, output the same result with step1 Expected results: no output Additional info: After restart libvirtd, can list node device info 4. # service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] 5. # virsh nodedev-list --tree computer | +-pci_8086_10bd | | | +-net_00_1e_4f_a8_ee_27 | +-pci_8086_244e +-pci_8086_2914 ................
The scenario described shows an attempt to destroy a NIC interface. The Nodedev destroy functionality only covers NPIV HBAs. So this hang is probably a flaw in our error detection path for non-NPIV devices.
My guess is this is solved by the following upstream commit: http://libvirt.org/git/?p=libvirt.git;a=commit;h=d686056f624474c61f901762604034fb88301783 However there is still an issue with virsh nodedev-destroy reporting success for devices that it doesn't actually destroy, though that is a separate issue.
Created attachment 377258 [details] Backport of upstream changeset Upstream change applied cleanly and builds fine.
Created attachment 377667 [details] rebased patch - 0 fuzz I've verified that the patch eliminates the libvirtd crash. The original patch had some fuzz, so I regenerated a patch with 0 fuzz.
Posted and ACK'ed on virtualist, Daniel
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix, Daniel
This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5. Already fixed,set status to VERIFIED. Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 libvirt]# uname -a Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@dhcp-66-70-62 libvirt]# rpm -qa|grep libvirt libvirt-0.6.3-25.el5 libvirt-python-0.6.3-25.el5 libvirt-debuginfo-0.6.3-25.el5 [root@dhcp-66-70-62 libvirt]# rpm -qa|grep xen xen-libs-3.0.3-102.el5 xen-devel-3.0.3-102.el5 kmod-gnbd-xen-0.1.5-2.el5 kmod-gfs-xen-0.1.34-9.el5 xen-3.0.3-102.el5 xen-libs-3.0.3-102.el5 kernel-xen-2.6.18-183.el5 kmod-cmirror-xen-0.1.22-3.el5 Steps to Reproduce: [root@dhcp-66-70-62 libvirt]# virsh nodedev-list --tree computer | +-pci_8086_10bd | | | +-net_00_23_ae_6f_f1_d7 | +-pci_8086_244e +-pci_8086_2914 ...... [root@dhcp-66-70-62 libvirt]# virsh nodedev-destroy pci_8086_10bd Destroyed node device 'pci_8086_10bd' [root@dhcp-66-70-62 libvirt]# virsh nodedev-list --tree computer | +-pci_8086_10bd | | | +-net_00_23_ae_6f_f1_d7 | +-pci_8086_244e +-pci_8086_2914 ......
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/RHBA-2010-0205.html