Bug 1600468

Summary: domifaddr should not query non-existing file for interface from host bridge network
Product: Red Hat Enterprise Linux 7 Reporter: Fangge Jin <fjin>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: yalzhang <yalzhang>
Severity: low Docs Contact:
Priority: low    
Version: 7.6CC: dyuan, lmen, xuzhang, yalzhang
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
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:24 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 Fangge Jin 2018-07-12 10:37:43 UTC
Description of problem:
domifaddr should not query non-existing file for interface from host bridge network

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

How reproducible:
100%

Steps to Reproduce:
1.Create a host bridge:
# virsh iface-bridge --interface eno1 --bridge br0 --no-stp

2.Create a network with forward bridge=br0
# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>7a7fd2e0-ab52-48ce-863f-e1178a6e5dd7</uuid>
  <forward mode='bridge'/>
  <bridge name='br0'/>
</network>

3.Start a guest with interface from the host-bridge network:
   <interface type='bridge'>
      <mac address='52:54:00:90:c8:27'/>
      <source network='host-bridge' bridge='br0'/>
      <target dev='vnet4'/>
      <model type='rtl8139'/>
      <alias name='net6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
    </interface>

4. Query guest interface address by domifaddr:
# virsh domifaddr $guest

5. Check syslog.
Jul 11 18:07:27 fjin-4-140 libvirtd: 2018-07-11 10:07:27.596+0000: 27245: error : virFileReadAll:1460 : Failed to open file '/var/lib/libvirt/dnsmasq/br0.status': No such file or directory


Actual results:
As step 5

Expected results:
No error, libvirt should not check file br0.status

Additional info:
Same for openvswitch

Comment 2 Michal Privoznik 2018-07-26 07:55:39 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2018-July/msg01756.html

Comment 5 yalzhang@redhat.com 2018-08-01 06:34:43 UTC
test on libvirt-4.5.0-5.virtcov.el7.x86_64, the bug is fixed.

# virsh domiflist rhel
Interface  Type       Source     Model       MAC
-------------------------------------------------------
net_target network    default    rtl8139     52:54:00:d5:e3:68
user_target user       -          rtl8139     52:54:00:9e:c8:e9
udp_target udp        -          rtl8139     52:54:00:22:c9:42
mcast_target mcast      -          rtl8139     52:54:00:93:db:5e
bridge_target bridge     br0        rtl8139     52:54:00:1e:a3:ae

# virsh domifaddr rhel
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 net_target 52:54:00:d5:e3:68    ipv4         192.168.122.80/24

# virsh domifaddr rhel bridge_target
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------

Check log file and found no error in libvirtd.log
Also test bridge type interface connected to ovs bridge, no error like comment 0.

Comment 7 errata-xmlrpc 2018-10-30 09:58:24 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