Bug 1871950

Summary: cannot set bridge mac-ageing-time to 0
Product: Red Hat Enterprise Linux 8 Reporter: Mingyu Shi <mshi>
Component: NetworkManagerAssignee: Fernando F. Mancera <ferferna>
Status: CLOSED ERRATA QA Contact: Vladimir Benes <vbenes>
Severity: high Docs Contact:
Priority: high    
Version: 8.3CC: acardace, bgalvani, ferferna, fge, jiji, jishi, lrintel, mrooks, network-qe, rkhan, sukulkar, till, vbenes
Target Milestone: rcKeywords: Triaged
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.36.0-0.2.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 14:54:06 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 Mingyu Shi 2020-08-24 16:38:34 UTC
Description of problem:
Cannot set bridge mac-ageing-time to 0.

Version-Release number of selected component (if applicable):
Verified with versions:
nmstate-0.3.4-12.el8.noarch
NetworkManager-1.26.0-6.el8.x86_64
DISTRO=RHEL-8.3.0-20200824.n.0
Linux sun-x5-2l-1.gsslab.rdu2.redhat.com 4.18.0-234.el8.x86_64 #1 SMP Thu Aug 20 10:25:32 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
100%

Steps to Reproduce:
echo '---
interfaces:
- name: br0
  type: linux-bridge
  state: up' | nmstatectl set

echo '---
interfaces:
- name: br0
  bridge:
    options:
      mac-ageing-time: 0' | nmstatectl set


Actual results:
Failed

Expected results:
No failure

Additional info:
Use 'ip link set br0 type bridge ageing_time 0' can make it, and 'nmstatectl show br0' will report mac-ageing-time as 0, but cannot set it.


[00:29:27@sun-x5-2l-1 ~]0# echo 'interfaces:
> - name: br0
>   bridge:
>     options:
>       mac-ageing-time: 0' | nmstatectl set
2020-08-25 00:30:28,511 root         DEBUG    Async action: Create checkpoint started
2020-08-25 00:30:28,513 root         DEBUG    Checkpoint None created for all devices
2020-08-25 00:30:28,513 root         DEBUG    Async action: Create checkpoint finished
2020-08-25 00:30:28,515 root         DEBUG    Async action: Update profile: br0 started
2020-08-25 00:30:28,518 root         DEBUG    Async action: Update profile: br0 finished
2020-08-25 00:30:28,518 root         DEBUG    Async action: Reapply device config: br0 started
2020-08-25 00:30:28,520 root         DEBUG    Device reapply failed on br0: error=nm-device-error-quark: Can't reapply any changes to 'bridge' setting (3)
Fallback to device activation
2020-08-25 00:30:28,520 root         DEBUG    Async action: Activate profile: br0 started
2020-08-25 00:30:28,523 root         DEBUG    Connection activation initiated: dev=br0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2020-08-25 00:30:28,537 root         DEBUG    Connection activation succeeded: dev=br0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>, dev-state=<enum NM_DEVICE_STATE_IP_CONFIG of type NM.DeviceState>, state-flags=<flags NM_ACTIVATION_STATE_FLAG_IS_MASTER | NM_ACTIVATION_STATE_FLAG_LAYER2_READY of type NM.ActivationStateFlags>
2020-08-25 00:30:28,537 root         DEBUG    Async action: Activate profile: br0 finished
2020-08-25 00:30:33,666 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/28 started
2020-08-25 00:30:33,669 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/28 rollback executed
2020-08-25 00:30:33,669 root         DEBUG    Async action: Waiting for rolling back br0 started
2020-08-25 00:30:33,670 root         DEBUG    Interface br0 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface eno3 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface lo rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface eno2 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface eno4 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface eno1 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Interface enp0s29u1u8c2 rollback succeeded
2020-08-25 00:30:33,670 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/28 finished
2020-08-25 00:30:33,672 root         DEBUG    Active connection of device None has been replaced
2020-08-25 00:30:33,674 root         DEBUG    Connection activation succeeded: dev=br0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>, dev-state=<enum NM_DEVICE_STATE_IP_CONFIG of type NM.DeviceState>, state-flags=<flags NM_ACTIVATION_STATE_FLAG_IS_MASTER | NM_ACTIVATION_STATE_FLAG_LAYER2_READY of type NM.ActivationStateFlags>
2020-08-25 00:30:33,674 root         DEBUG    Async action: Waiting for rolling back br0 finished
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==0.3.4', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 67, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 267, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 289, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 71, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 115, in _apply_ifaces_state
    _verify_change(plugins, net_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 120, in _verify_change
    net_state.verify(current_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 63, in verify
    self._ifaces.verify(current_state.get(Interface.KEY))
  File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 349, in verify
    cur_iface.state_for_verify(),
libnmstate.error.NmstateVerificationError: 
desired
=======
---
name: br0
type: linux-bridge
state: up
bridge:
  options:
    mac-ageing-time: 0

current
=======
---
name: br0
type: linux-bridge
state: up
bridge:
  options:
    group-addr: 01:80:C2:00:00:00
    group-forward-mask: 0
    hash-max: 4096
    mac-ageing-time: 300
    multicast-last-member-count: 2
    multicast-last-member-interval: 100
    multicast-querier: false
    multicast-querier-interval: 25500
    multicast-query-interval: 12500
    multicast-query-response-interval: 1000
    multicast-query-use-ifaddr: false
    multicast-router: 1
    multicast-snooping: true
    multicast-startup-query-count: 2
    multicast-startup-query-interval: 3125
    stp:
      enabled: true
      forward-delay: 15
      hello-time: 2
      max-age: 20
      priority: 32768
  port: []
ipv4:
  enabled: false
ipv6:
  enabled: false
lldp:
  enabled: false
mac-address: 0A:78:EA:7E:39:62
mtu: 1500

difference
==========
--- desired
+++ current
@@ -4,4 +4,33 @@
 state: up
 bridge:
   options:
-    mac-ageing-time: 0
+    group-addr: 01:80:C2:00:00:00
+    group-forward-mask: 0
+    hash-max: 4096
+    mac-ageing-time: 300
+    multicast-last-member-count: 2
+    multicast-last-member-interval: 100
+    multicast-querier: false
+    multicast-querier-interval: 25500
+    multicast-query-interval: 12500
+    multicast-query-response-interval: 1000
+    multicast-query-use-ifaddr: false
+    multicast-router: 1
+    multicast-snooping: true
+    multicast-startup-query-count: 2
+    multicast-startup-query-interval: 3125
+    stp:
+      enabled: true
+      forward-delay: 15
+      hello-time: 2
+      max-age: 20
+      priority: 32768
+  port: []
+ipv4:
+  enabled: false
+ipv6:
+  enabled: false
+lldp:
+  enabled: false
+mac-address: 0A:78:EA:7E:39:62
+mtu: 1500

Comment 2 Gris Ge 2020-12-18 09:01:46 UTC
Nmstate does not have to change anything, this is a bug of NetworkManager.

Reproducer:

sudo nmcli c add type bridge ifname br0 connection.id br0 ipv4.method disabled ipv6.method disabled bridge.ageing-time 0
cat /sys/class/net/br0/bridge/ageing_time

Comment 7 Vladimir Benes 2021-11-29 14:33:19 UTC
correctly failing in NetworkManager-1.36.0-0.1.el8.x86_64 and fixed in current main branch NM-1.35.1-29456.copr.7f8c8078a1.el8

https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/880

Comment 10 Vladimir Benes 2022-01-12 13:06:01 UTC
The test is correctly running with distro package.

Comment 13 errata-xmlrpc 2022-05-10 14:54:06 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/RHEA-2022:1985