RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1786935 - Cannot get/set mac address of ovs-interface
Summary: Cannot get/set mac address of ovs-interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-29 16:41 UTC by omergi
Modified: 2022-10-11 18:55 UTC (History)
5 users (show)

Fixed In Version: nmstate-0.2.4-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:00:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1786937 0 medium CLOSED Cannot get mac address of ovs-interface or ovs-bridge 2023-06-27 13:32:40 UTC
Red Hat Issue Tracker RHELPLAN-37249 0 None None None 2022-10-11 18:55:25 UTC
Red Hat Product Errata RHBA-2020:1696 0 None None None 2020-04-28 16:00:26 UTC

Internal Links: 1786937

Description omergi 2019-12-29 16:41:51 UTC
Description of problem:
When trying to get the mac address of an ovs-interface with nmstate it is shown as (unknown).
It is also not possible to set the mac address of an ovs-interface w/o --no-verify parameter.
(If I use the parameter --no-verify the mac address is set properly)

For example:
I try to set ovs-interface mac address as the address of the nic i connect to the ovs-bridge and set the ipv4.method to auto, such that the ovs-interface will get the same ip address as the nic.


Version-Release number of selected component (if applicable):

How reproducible:
Create an ovs-interface with nmstate, then try to set/view it mac address.

Steps to Reproduce:
1.
get the desired nic mac address, for example eth1

create state mystate.yaml: 
interfaces:
- name: mybr
  type: ovs-bridge
  state: up
  bridge:
    port:
    - name: mybr0
    - name: eth0
- name: mybr0
  type: ovs-interface
  state: up
  mac-address: <eth0 mac address>
  ipv4:
    enabled: true
    dhcp: true


nmstatectl set mystate.yaml
nmstatectl show 
mac address wont show.

Actual results on NetworkManager:
nmcli device show mybr0
result:
GENERAL.HWADDR: (unknown)

Expected results:
eth0 mac address on ovs-interface through 'nmstatectl show' output
eth0 mac address on ovs-interface through 'nmcli c show mybr0' output

Additional info:
log of the upper state:
nmstatectl set mystate.yaml
2019-12-29 18:36:18,870 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/111 created for all devices: 60
2019-12-29 18:36:18,870 root         DEBUG    Adding new interfaces: ['mybr0', 'mybr']
2019-12-29 18:36:18,871 root         DEBUG    Connection settings for ConnectionSetting.create:
id: mybr0
iface: mybr0
uuid: eeb01956-7b12-4fe3-be2f-2452cbfec830
type: ovs-interface
autoconnect: True
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES of type NM.SettingConnectionAutoconnectSlaves>
2019-12-29 18:36:18,872 root         DEBUG    Connection settings for ConnectionSetting.create:
id: mybr
iface: mybr
uuid: da02fe6a-bd9a-484d-9624-db661fe6b2fd
type: ovs-bridge
autoconnect: True
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES of type NM.SettingConnectionAutoconnectSlaves>
2019-12-29 18:36:18,873 root         DEBUG    Connection settings for ConnectionSetting.create:
id: ovs-port-mybr0
iface: ovs-port-mybr0
uuid: 71a96c02-0f49-4b86-8a02-e9a3c7f3a6b4
type: ovs-port
autoconnect: True
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES of type NM.SettingConnectionAutoconnectSlaves>
2019-12-29 18:36:18,874 root         DEBUG    Editing interfaces: ['eth0']
2019-12-29 18:36:18,874 root         DEBUG    Connection settings for ConnectionSetting.import_by_profile:
id: eth0
iface: eth0
uuid: 11bb6566-1e31-496e-9347-7a66549fc677
type: 802-3-ethernet
autoconnect: True
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT of type NM.SettingConnectionAutoconnectSlaves>
2019-12-29 18:36:18,875 root         DEBUG    Connection settings for ConnectionSetting.create:
id: ovs-port-eth0
iface: ovs-port-eth0
uuid: f1117796-15df-4aa6-8f45-879114fa4bc7
type: ovs-port
autoconnect: True
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES of type NM.SettingConnectionAutoconnectSlaves>
2019-12-29 18:36:18,877 root         DEBUG    Executing NM action: func=add_connection_async
2019-12-29 18:36:18,884 root         DEBUG    Connection adding succeeded: dev=mybr0
2019-12-29 18:36:18,884 root         DEBUG    Executing NM action: func=add_connection_async
2019-12-29 18:36:18,911 root         DEBUG    Connection adding succeeded: dev=mybr
2019-12-29 18:36:18,911 root         DEBUG    Executing NM action: func=add_connection_async
2019-12-29 18:36:18,942 root         DEBUG    Connection adding succeeded: dev=ovs-port-mybr0
2019-12-29 18:36:18,942 root         DEBUG    Executing NM action: func=commit_changes_async
2019-12-29 18:36:18,949 root         DEBUG    Connection update succeeded: dev=eth0
2019-12-29 18:36:18,949 root         DEBUG    Executing NM action: func=add_connection_async
2019-12-29 18:36:18,951 root         DEBUG    Connection adding succeeded: dev=ovs-port-eth0
2019-12-29 18:36:18,952 root         DEBUG    Executing NM action: func=safe_activate_async
2019-12-29 18:36:18,988 root         DEBUG    Connection activation initiated: dev=mybr, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2019-12-29 18:36:19,063 root         DEBUG    Connection activation succeeded: dev=mybr, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>, dev-state= <enum NM_DEVICE_STATE_IP_CONFIG of type NM.DeviceState>
2019-12-29 18:36:19,063 root         DEBUG    Executing NM action: func=safe_activate_async
2019-12-29 18:36:19,098 root         DEBUG    Connection activation initiated: dev=ovs-port-eth0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2019-12-29 18:36:19,209 root         DEBUG    Connection activation succeeded: dev=ovs-port-eth0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATED of type NM.ActiveConnectionState>, dev-state= <enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>
2019-12-29 18:36:19,210 root         DEBUG    Executing NM action: func=safe_activate_async
2019-12-29 18:36:19,243 root         DEBUG    Connection activation initiated: dev=ovs-port-mybr0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2019-12-29 18:36:19,329 root         DEBUG    Connection activation succeeded: dev=ovs-port-mybr0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATED of type NM.ActiveConnectionState>, dev-state= <enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>
2019-12-29 18:36:19,329 root         DEBUG    Executing NM action: func=safe_activate_async
2019-12-29 18:36:19,343 root         DEBUG    Connection activation initiated: dev=mybr0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2019-12-29 18:36:19,383 root         DEBUG    Connection activation succeeded: dev=mybr0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>, dev-state= <enum NM_DEVICE_STATE_IP_CONFIG of type NM.DeviceState>
2019-12-29 18:36:19,383 root         DEBUG    Executing NM action: func=_safe_modify_async
2019-12-29 18:36:19,385 root         DEBUG    Device reapply succeeded: dev=eth0
2019-12-29 18:36:19,385 root         DEBUG    NM action queue exhausted, quiting mainloop
2019-12-29 18:36:19,474 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/111 rollback executed: dbus.Dictionary({dbus.String('/org/freedesktop/NetworkManager/Devices/3'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1'): dbus.UInt32(0)}, signature=dbus.Signature('su'))
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==0.1.2', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 59, in main
    return args.func(args)
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 217, in apply
    statedata, args.verify, args.commit, args.timeout
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 237, in apply_state
    checkpoint = libnmstate.apply(state, verify_change, commit, timeout)
  File "/usr/lib/python3.7/site-packages/libnmstate/netapplier.py", line 66, in apply
    state.State(desired_state), verify_change, commit, rollback_timeout
  File "/usr/lib/python3.7/site-packages/libnmstate/netapplier.py", line 153, in _apply_ifaces_state
    _verify_change(desired_state)
  File "/usr/lib/python3.7/site-packages/libnmstate/netapplier.py", line 200, in _verify_change
    desired_state.verify_interfaces(current_state)
  File "/usr/lib/python3.7/site-packages/libnmstate/state.py", line 327, in verify_interfaces
    self._assert_interfaces_equal(other_state)
  File "/usr/lib/python3.7/site-packages/libnmstate/state.py", line 615, in _assert_interfaces_equal
    current_state.interfaces[ifname],
libnmstate.error.NmstateVerificationError: 
desired
=======
---
name: mybr0
type: ovs-interface
state: up
ipv4:
  address: []
  auto-dns: true
  auto-gateway: true
  auto-routes: true
  dhcp: true
  enabled: true
ipv6:
  enabled: false
mac-address: 52:54:00:50:0D:F4
mtu: 1500

current
=======
---
name: mybr0
type: ovs-interface
state: up
ipv4:
  address: []
  auto-dns: true
  auto-gateway: true
  auto-routes: true
  dhcp: true
  enabled: true
ipv6:
  enabled: false
mtu: 1500

difference
==========
--- desired
+++ current
@@ -11,5 +11,4 @@
   enabled: true
 ipv6:
   enabled: false
-mac-address: 52:54:00:50:0D:F4
 mtu: 1500

Comment 1 Gris Ge 2020-02-12 10:53:10 UTC
nmstate-0.2.3-1 can query OVS mac address and also set MAC address at creation.

But when editing MAC address of existing OVS interface, got failure https://github.com/nmstate/nmstate/issues/777

Comment 2 Gris Ge 2020-02-13 05:30:47 UTC
Fix post to upstream: https://github.com/nmstate/nmstate/pull/787

Comment 7 errata-xmlrpc 2020-04-28 16:00:10 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/RHBA-2020:1696


Note You need to log in before you can comment on or make changes to this bug.