Bug 1873217

Summary: Failed when including lowercase in bridge option group-addr
Product: Red Hat Enterprise Linux 8 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: ferferna, jiji, jishi, network-qe, till
Target Milestone: rcKeywords: Triaged
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:17:45 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:
Attachments:
Description Flags
beaker.log none

Description Mingyu Shi 2020-08-27 16:07:17 UTC
Description of problem:
When set group-addr: 01:80:C2:00:00:0X, X as 'a to f', it will fail. It works when using 'A to F', please make it case insensitive.

Version-Release number of selected component (if applicable):
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:
cat << EOF > br0-basic.yaml
interfaces:
- name: br0
  type: linux-bridge
  state: up
  bridge:
    port:
    - name: dummy0
- name: dummy0
  state: up
  type: dummy
EOF
nmstatectl set br0-basic.yaml
cat << EOF > br0-group_addr.yaml
interfaces:
- name: br0
  type: linux-bridge
  state: up
  bridge:
    options:
      group-addr: 01:80:C2:00:00:0a
EOF
nmstatectl set br0-group_addr.yaml

Actual results:
Failed

Expected results:
No failure

Additional info:
[00:04:10@sun-x5-2l-1 ~]0# nmstatectl edit br0
Applying the following state: 
---
interfaces:
- name: br0
  type: linux-bridge
  state: up
  bridge:
    options:
      group-addr: 01:80:C2:00:00:0a
2020-08-28 00:06:21,869 root         DEBUG    Async action: Create checkpoint started
2020-08-28 00:06:21,871 root         DEBUG    Checkpoint None created for all devices
2020-08-28 00:06:21,871 root         DEBUG    Async action: Create checkpoint finished
2020-08-28 00:06:21,873 root         DEBUG    Async action: Update profile: br0 started
2020-08-28 00:06:21,875 root         DEBUG    Async action: Update profile: br0 finished
2020-08-28 00:06:21,876 root         DEBUG    Async action: Reapply device config: br0 started
2020-08-28 00:06:21,877 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-28 00:06:21,878 root         DEBUG    Async action: Activate profile: br0 started
2020-08-28 00:06:21,881 root         DEBUG    Connection activation initiated: dev=br0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2020-08-28 00:06:21,910 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 | NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES of type NM.ActivationStateFlags>
2020-08-28 00:06:21,910 root         DEBUG    Async action: Activate profile: br0 finished
2020-08-28 00:06:27,049 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/129 started
2020-08-28 00:06:27,062 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/129 rollback executed
2020-08-28 00:06:27,062 root         DEBUG    Interface eno4 rollback succeeded
2020-08-28 00:06:27,062 root         DEBUG    Interface eno3 rollback succeeded
2020-08-28 00:06:27,062 root         DEBUG    Async action: Waiting for rolling back dummy0 started
2020-08-28 00:06:27,062 root         DEBUG    Interface dummy0 rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Async action: Waiting for rolling back br0 started
2020-08-28 00:06:27,063 root         DEBUG    Interface br0 rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Interface enp0s29u1u8c2 rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Interface eno1 rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Interface eno2 rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Interface lo rollback succeeded
2020-08-28 00:06:27,063 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/129 finished
2020-08-28 00:06:27,067 root         DEBUG    Active connection of device None has been replaced
2020-08-28 00:06:27,069 root         DEBUG    Active connection of device None has been replaced
2020-08-28 00:06:27,070 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 | NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES of type NM.ActivationStateFlags>
2020-08-28 00:06:27,070 root         DEBUG    Async action: Waiting for rolling back br0 finished
2020-08-28 00:06:27,074 root         DEBUG    Connection activation succeeded: dev=dummy0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATED of type NM.ActiveConnectionState>, dev-state=<enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>, state-flags=<flags NM_ACTIVATION_STATE_FLAG_IS_SLAVE | NM_ACTIVATION_STATE_FLAG_LAYER2_READY | NM_ACTIVATION_STATE_FLAG_IP4_READY | NM_ACTIVATION_STATE_FLAG_IP6_READY of type NM.ActivationStateFlags>
2020-08-28 00:06:27,074 root         DEBUG    Async action: Waiting for rolling back dummy0 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 225, in edit
    new_state, verify_change=args.verify, save_to_disk=args.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:
    group-addr: 01:80:C2:00:00:0a

current
=======
---
name: br0
type: linux-bridge
state: up
bridge:
  options:
    group-addr: 01:80:C2:00:00:0A
    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:
  - name: dummy0
    stp-hairpin-mode: false
    stp-path-cost: 100
    stp-priority: 32
    vlan: {}
ipv4:
  enabled: false
ipv6:
  enabled: false
lldp:
  enabled: false
mac-address: 2A:19:72:E6:6C:3B
mtu: 1500

difference
==========
--- desired
+++ current
@@ -4,4 +4,38 @@
 state: up
 bridge:
   options:
-    group-addr: 01:80:C2:00:00:0a
+    group-addr: 01:80:C2:00:00:0A
+    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:
+  - name: dummy0
+    stp-hairpin-mode: false
+    stp-path-cost: 100
+    stp-priority: 32
+    vlan: {}
+ipv4:
+  enabled: false
+ipv6:
+  enabled: false
+lldp:
+  enabled: false
+mac-address: 2A:19:72:E6:6C:3B
+mtu: 1500

Comment 2 Mingyu Shi 2021-01-18 11:30:35 UTC
Verified with versions:
nmstate-1.0.1-0.20210115115643933056.pr1478.27.gc9b2298.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.5.el8.x86_64

Comment 3 Mingyu Shi 2021-01-18 11:31:55 UTC
Created attachment 1748433 [details]
beaker.log

Comment 7 Mingyu Shi 2021-01-20 09:38:11 UTC
Verified with versions:
nmstate-1.0.1-1.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.5.el8.x86_64

Comment 9 errata-xmlrpc 2021-05-18 15:17:45 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 (nmstate 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-2021:1748