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 1855189 - Fail to change bridge slave if an unmanaged slave exists
Summary: Fail to change bridge slave if an unmanaged slave exists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.3
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-09 07:56 UTC by Mingyu Shi
Modified: 2020-11-04 03:10 UTC (History)
5 users (show)

Fixed In Version: nmstate-0.3.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:08:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verified.log (7.95 KB, text/plain)
2020-07-30 10:43 UTC, Mingyu Shi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1220 0 None closed nm bridge: Support replacing unmanaged ports 2020-12-03 06:58:05 UTC
Red Hat Product Errata RHBA-2020:4696 0 None None None 2020-11-04 03:09:08 UTC

Internal Links: 1932247

Description Mingyu Shi 2020-07-09 07:56:25 UTC
Description of problem:
Fail to change bridge slave if an unmanaged slave exists

Version-Release number of selected component (if applicable):
nmstate-0.3.3-2.el8.noarch
NetworkManager-1.26.0-0.2.1.el8.x86_64
DISTRO=RHEL-8.3.0-20200709.n.0
Linux hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com 4.18.0-223.el8.x86_64 #1 SMP Tue Jul 7 12:56:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
100%

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

ip link add dummy0 type dummy
ip link set dummy0 up
nmcli dev set dummy0 managed no
ip link set dummy0 master br0
ip link show dummy0 | grep 'master br0'

echo 'interfaces:
- name: dummy1
  type: dummy
  state: up
- name: br0
  type: linux-bridge
  state: up
  bridge:
    port:
    - name: dummy1' | nmstatectl set

Actual results:
Fail

Expected results:
No failure

Additional info:
# echo 'interfaces:
> - name: dummy1
>   type: dummy
>   state: up
> - name: br0
>   type: linux-bridge
>   state: up
>   bridge:
>     port:
>     - name: dummy1' | nmstatectl set
2020-07-09 15:55:12,790 root         DEBUG    Async action: Create checkpoint started
2020-07-09 15:55:12,795 root         DEBUG    Checkpoint None created for all devices
2020-07-09 15:55:12,795 root         DEBUG    Async action: Create checkpoint finished
2020-07-09 15:55:12,797 root         DEBUG    Async action: Update profile: br0 started
2020-07-09 15:55:12,799 root         DEBUG    Async action: Add profile: dummy1 started
2020-07-09 15:55:12,802 root         DEBUG    Async action: Update profile: br0 finished
2020-07-09 15:55:12,805 root         DEBUG    Async action: Add profile: dummy1 finished
2020-07-09 15:55:12,805 root         DEBUG    Async action: Activate profile: dummy1 started
2020-07-09 15:55:12,835 root         DEBUG    Connection activation initiated: dev=dummy1, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2020-07-09 15:55:12,849 root         DEBUG    Connection activation succeeded: dev=dummy1, 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-07-09 15:55:12,849 root         DEBUG    Async action: Activate profile: dummy1 finished
2020-07-09 15:55:12,850 root         DEBUG    Async action: Reapply device config: br0 started
2020-07-09 15:55:12,852 root         DEBUG    Async action: Reapply device config: br0 finished
2020-07-09 15:55:18,099 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/93 started
2020-07-09 15:55:18,116 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/93 rollback executed
2020-07-09 15:55:18,116 root         DEBUG    Async action: Waiting for rolling back br0 started
2020-07-09 15:55:18,116 root         DEBUG    Interface br0 rollback succeeded
2020-07-09 15:55:18,117 root         DEBUG    Interface lo rollback succeeded
2020-07-09 15:55:18,117 root         DEBUG    Interface ens3 rollback succeeded
2020-07-09 15:55:18,117 root         DEBUG    Interface dummy0 rollback succeeded
2020-07-09 15:55:18,117 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/93 finished
2020-07-09 15:55:18,121 root         DEBUG    Active connection of device None has been replaced
2020-07-09 15:55:18,135 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-07-09 15:55:18,136 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.3', '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 256, 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 308, in verify
    cur_iface.state_for_verify(),
libnmstate.error.NmstateVerificationError: 
desired
=======
---
name: br0
type: linux-bridge
state: up
bridge:
  port:
  - name: dummy1
    vlan: {}

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:
  - name: dummy0
    stp-hairpin-mode: false
    stp-path-cost: 100
    stp-priority: 32
    vlan: {}
  - name: dummy1
    stp-hairpin-mode: false
    stp-path-cost: 100
    stp-priority: 32
    vlan: {}
ipv4:
  enabled: false
ipv6:
  enabled: false
lldp:
  enabled: false
mac-address: 16:3E:10:19:88:9B
mtu: 1500

difference
==========
--- desired
+++ current
@@ -3,6 +3,44 @@
 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:
+  - name: dummy0
+    stp-hairpin-mode: false
+    stp-path-cost: 100
+    stp-priority: 32
+    vlan: {}
   - name: dummy1
+    stp-hairpin-mode: false
+    stp-path-cost: 100
+    stp-priority: 32
     vlan: {}
+ipv4:
+  enabled: false
+ipv6:
+  enabled: false
+lldp:
+  enabled: false
+mac-address: 16:3E:10:19:88:9B
+mtu: 1500

Comment 1 Mingyu Shi 2020-07-09 09:44:55 UTC
It works well on 8.2, https://bugzilla.redhat.com/show_bug.cgi?id=1788797
Due to some updates about supporting unmanged interface?

Comment 5 Mingyu Shi 2020-07-30 10:43:15 UTC
Created attachment 1702927 [details]
verified.log

Verified with versions:
nmstate-0.3.4-3.el8.noarch
NetworkManager-1.26.0-2.el8.x86_64
DISTRO=RHEL-8.3.0-20200728.n.0
Linux hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com 4.18.0-228.el8.x86_64 #1 SMP Mon Jul 27 06:05:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Notice there's a change, on RHEL 8.2, nmstate won't affect unmanged dummy0, but in current version, it will.

Comment 8 errata-xmlrpc 2020-11-04 03:08:54 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-2020:4696


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