Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1510257

Summary: No events captured when providing pci address as filter for 'virsh nodedev-event --device'
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: yafu <yafu>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact: yalzhang <yalzhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dyuan, jsuchane, rbalakri, xuzhang, yalzhang, yisun
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description yafu 2017-11-07 02:37:09 UTC
Description of problem:
No events captured when providing pci address as filter for 'virsh nodedev-event --device'
Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Open one terminal and execute:
#virsh nodedev-event --event lifecycle --loop  --device pci_0000_03_00_0

2.Open another terminal, do nodedev-reattach:
#for i in {1..10} ; do virsh nodedev-reattach pci_0000_03_00_0 ; done

3.Check the outputs in step1:
no output.

4.Execute 'virsh nodedev-event --device' with non-existing pci address:
# virsh nodedev-event --event lifecycle --loop --device pci_0000_03_00
error: Could not find matching device 'pci_0000_03_00'
error: Node device not found: no node device with matching name 'pci_0000_03_00'

Actual results:
No events captured when providing pci address as filter for 'virsh nodedev-event --device' and also no error report.

Expected results:
1.If 'virsh nodedev-event --devcie' does not support filter by pci address, it should report error like step 4;

2.If 'virsh nodedev-event' accept the pci address for the filter node device, it should capture the events for the pci address in the terminal 1 after step 2.

Comment 2 2018-06-19 07:24:35 UTC
Test on libvirt-4.4.0-2.el7.x86_64

If do not use any filter, there is still no event about pci related event.
# virsh nodedev-dumpxml --tree
  |           +- pci_0000_07_00_1
  |               |
  |               +- net_enp7s0f1_00_1b_21_55_b3_bd

# virsh nodedev-detach pci_0000_07_00_1
Device pci_0000_07_00_1 detached

event captured on another terminal:
# virsh nodedev-event --event lifecycle --loop
event 'lifecycle' for node device net_enp7s0f1_00_1b_21_55_b3_bd: Deleted

nothing about pci_0000_07_00_1, so I think it is not about the filter.