Bug 1786937

Summary: Cannot get mac address of ovs-interface or ovs-bridge
Product: Red Hat Enterprise Linux 8 Reporter: omergi
Component: NetworkManagerAssignee: Antonio Cardace <acardace>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: acardace, atragler, bgalvani, danken, lrintel, pasik, rkhan, sukulkar, thaller, till, vbenes
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.25.1-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:49:00 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:
Bug Depends On:    
Bug Blocks: 1738136    

Description omergi 2019-12-29 17:20:24 UTC
Description of problem:
When trying to get the mac address of an ovs-interface or ovs-bridge with NetworkManager it is shown as (unknown).

Version-Release number of selected component (if applicable):
NetworkManager-1.18.0-5.el7_7.1.1.bz1740557.x86_64
NetworkManager-1.20.8-1.fc31.x86_64
NetworkManager-1:1.14.0-14.el8.x86_64

How reproducible:
Create ovs-bridge, ovs-port and ovs-interface.
Get interface and bridge mac address with nmcli

Steps to Reproduce:
nmcli conn add type ovs-bridge \
    connection.id mybr \
    connection.interface-name mybr
nmcli conn add type ovs-port \
    connection.interface-name mybr-port0 \
    master mybr
nmcli connection add type ovs-interface \
    connection.id mybr1 \
    connection.interface-name mybr1 \
    master mybr-port0 


Actual results:
ip a:
mybr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether ba:16:4c:dc:18:f4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.9/24 brd 192.168.122.255 scope global dynamic noprefixroute mybr1
       valid_lft 3518sec preferred_lft 3518sec

nmcli device show mybr:
GENERAL.DEVICE:                         mybr
GENERAL.TYPE:                           ovs-bridge
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            0
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     mybr
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/983

nmcli device show mybr1:
GENERAL.DEVICE:                         mybr1
GENERAL.TYPE:                           ovs-interface
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     mybr1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/994
IP4.ADDRESS[1]:                         192.168.122.9/24
IP4.GATEWAY:                            192.168.122.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.122.1, mt = 801
IP4.ROUTE[2]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 801
IP4.DNS[1]:                             192.168.122.1
IP6.ADDRESS[1]:                         fe80::bf26:dc6d:e890:f4b5/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 801
IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255


Expected results:
GENERAL.DEVICE:                         mybr1
GENERAL.TYPE:                           ovs-interface
GENERAL.HWADDR:                         ba:16:4c:dc:18:f4
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     mybr1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/994
IP4.ADDRESS[1]:                         192.168.122.9/24
IP4.GATEWAY:                            192.168.122.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.122.1, mt = 801
IP4.ROUTE[2]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 801
IP4.DNS[1]:                             192.168.122.1
IP6.ADDRESS[1]:                         fe80::bf26:dc6d:e890:f4b5/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 801
IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255


Additional info:

Comment 1 Till Maas 2020-01-07 09:24:29 UTC
This is needed for Nmstate, too. See: https://github.com/nmstate/nmstate/pull/664

Comment 2 Antonio Cardace 2020-03-06 11:24:34 UTC
Working on this on https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/430.

Comment 3 Antonio Cardace 2020-03-13 09:26:22 UTC
Fixed upstream on master with commit:067a3d6c08.

Comment 6 Vladimir Benes 2020-07-03 09:46:01 UTC
we can see iface0 MAC addr. now in CI test:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/594

Comment 9 errata-xmlrpc 2020-11-04 01:49:00 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 (NetworkManager bug fix and enhancement update), 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/RHBA-2020:4499