Bug 1607831

Summary: Error message about nwfilter promoted when fail to start vm
Product: Red Hat Enterprise Linux 7 Reporter: yalzhang <yalzhang>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: yalzhang <yalzhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: fjin, tburke, yafu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.5.0-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:58:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yalzhang@redhat.com 2018-07-24 11:17:38 UTC
Description of problem:
there is error like "virNWFilterBindingLookupByPortDev:589 : portdev in virNWFilterBindingLookupByPortDev must not be NULL" promoted once the vm is failed to start

Version-Release number of selected component (if applicable):
libvirt-4.5.0-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set libvirtd log
# rm -fr /var/log/libvirt/libvirtd.log
append below settings into /etc/libvirt/libvirtd.conf
log_level=2
log_outputs='2:file:/var/log/libvirt/libvirtd.log'
 
2. restart libvirtd
# systemctl restart libvirtd
# grep error /var/log/libvirt/libvirtd.log

3. make some changes, to let the vm fail to start, such as:
# virsh net-destroy default
Network default destroyed
# virsh dumpxml rhel | grep /interface -B5
    <interface type='network'>
      <mac address='52:54:00:9b:f2:25'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </interface>
# virsh start rhel
error: Failed to start domain rhel
error: Requested operation is not valid: network 'default' is not active

4. check the libvirtd log, there is error about nwfilter
# grep error /var/log/libvirt/libvirtd.log
2018-07-24 11:05:38.015+0000: 7174: error : virNWFilterBindingLookupByPortDev:589 : portdev in virNWFilterBindingLookupByPortDev must not be NULL


Scenario B: 
edit the images to non-exists ones:
# virsh dumpxml rhel | grep /disk -B6
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/non-exists/RHEL-7.6-x86_64-latest.qcow2'/>
...
    </disk>
# virsh start rhel
error: Failed to start domain rhel
error: Cannot access storage file '/var/lib/libvirt/non-exists/RHEL-7.6-x86_64-latest.qcow2' (as uid:107, gid:107): No such file or directory

# grep error /var/log/libvirt/libvirtd.log
2018-07-24 11:09:14.947+0000: 27080: error : virStorageFileReportBrokenChain:4656 : Cannot access storage file '/var/lib/libvirt/non-exists/RHEL-7.6-x86_64-latest.qcow2' (as uid:107, gid:107): No such file or directory
2018-07-24 11:09:14.949+0000: 27080: error : virNWFilterBindingLookupByPortDev:589 : portdev in virNWFilterBindingLookupByPortDev must not be NULL

Scenario C:
set vm with non-exists nwfiler
# virsh dumpxml rhel | grep /interface -B6
    <interface type='network'>
      <mac address='52:54:00:9b:f2:25'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <filterref filter='no-exists'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </interface>
# virsh start rhel
error: Failed to start domain rhel
error: internal error: referenced filter 'no-exists' is missing
# grep error /var/log/libvirt/libvirtd.log
2018-07-24 11:12:54.141+0000: 17114: error : virNWFilterObjListFindInstantiateFilter:201 : internal error: referenced filter 'no-exists' is missing
2018-07-24 11:12:54.164+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.173+0000: 17114: error : virNWFilterBindingLookupByPortDev:589 : portdev in virNWFilterBindingLookupByPortDev must not be NULL
2018-07-24 11:12:54.174+0000: 17114: error : virNWFilterBindingLookupByPortDev:589 : portdev in virNWFilterBindingLookupByPortDev must not be NULL
2018-07-24 11:12:54.176+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.179+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.181+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.183+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.193+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.198+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device
2018-07-24 11:12:54.200+0000: 17253: error : virNetDevSendEthtoolIoctl:3072 : ethtool ioctl error: No such device

Actual results:
there is error about nwfilter when fail to start mv

Expected results:
there should be no such error

Additional info:

Comment 2 yalzhang@redhat.com 2018-07-24 11:19:01 UTC
This kind of error was also mentioned in https://www.redhat.com/archives/libvir-list/2018-June/msg01348.html, hope it helps for analysis.

Comment 4 Fangge Jin 2018-07-26 23:29:26 UTC
*** Bug 1607796 has been marked as a duplicate of this bug. ***

Comment 6 yalzhang@redhat.com 2018-08-01 03:05:07 UTC
Test on libvirt-4.5.0-5.el7.x86_64 with the scenarios in comment 0, no such error any more, set the bug to be verified.

Comment 8 errata-xmlrpc 2018-10-30 09:58:28 UTC
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://access.redhat.com/errata/RHSA-2018:3113