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 1749314 - Cannot create a bridge whose port is a bond having as slave a pre-existent ethernet interface with ip
Summary: Cannot create a bridge whose port is a bond having as slave a pre-existent et...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.1
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: 8.1
Assignee: Miguel Duarte Barroso
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-05 10:56 UTC by Miguel Duarte Barroso
Modified: 2020-11-14 07:27 UTC (History)
6 users (show)

Fixed In Version: nmstate-0.0.8-13.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 20:52:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
activate eth1 interface, setting ip in it (164 bytes, text/plain)
2019-09-05 10:56 UTC, Miguel Duarte Barroso
no flags Details
create a bond interface having as slave a pre-existent port with IP, and add that bond as a port to a bridge (565 bytes, text/plain)
2019-09-05 10:58 UTC, Miguel Duarte Barroso
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 489 0 'None' closed nm.applier: Prioritize master interfaces activaction 2020-09-30 00:02:56 UTC
Red Hat Product Errata RHBA-2019:3347 0 None None None 2019-11-05 20:52:23 UTC

Description Miguel Duarte Barroso 2019-09-05 10:56:54 UTC
Created attachment 1611909 [details]
activate eth1 interface, setting ip in it

Description of problem:
When adding complex network configurations - for instance, attaching a bond (with slaves) as a port to a bridge, within a single transaction, it is possible for the transaction to fail, and rolled-back.

Version-Release number of selected component (if applicable):
nmstate-0.0.8-12.el8

How reproducible:
50 % of times

Steps to Reproduce:
1. start the nmstate container - e.g. ./automation/run-tests.sh --debug-shell
2. interrupt the shell when the tests start. that'll give a shell into the nmstate container
3. provision the activate_eth1.yml attachment
4. provision the bridge_over_bond_over_slave_single_tx.yml attachment

Actual results:
2019-09-05 10:46:49,353 root         ERROR    NM main-loop aborted: Connection activation failed on connection_id bond0: error=nm-manager-error-quark: Master device 'bond0' can't be activated: Device unmanaged or not available for activation (7)
2019-09-05 10:46:49,376 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/2 rollback executed: dbus.Dictionary({dbus.String('/org/freedesktop/NetworkManager/Devices/4'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/3'): 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.0.8', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 62, in main
    return args.func(args)
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 220, in apply
    statedata, args.verify, args.commit, args.timeout
  File "/usr/lib/python3.7/site-packages/nmstatectl/nmstatectl.py", line 240, 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 146, in _apply_ifaces_state
    con_profiles=ifaces_add_configs + ifaces_edit_configs,
  File "/usr/lib64/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/usr/lib/python3.7/site-packages/libnmstate/netapplier.py", line 210, in _setup_providers
    mainloop.error
libnmstate.error.NmstateLibnmError: Unexpected failure of libnm when running the mainloop: run execution


Expected results:
...
2019-09-05 10:52:44,687 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/13 destroyed
Desired state applied: 
---
interfaces:
- name: bond0
  type: bond
  state: up
  link-aggregation:
    mode: balance-rr
    options:
      miimon: '140'
    slaves:
    - eth1
- name: eth1
  type: ethernet
  state: up
- name: linux-br0
  type: linux-bridge
  state: up
  bridge:
    options:
      group-forward-mask: 0
      mac-ageing-time: 300
      multicast-snooping: true
      stp:
        enabled: true
        forward-delay: 15
        hello-time: 2
        max-age: 20
        priority: 32768
    port:
    - name: bond0


Additional info:
The following can be seen in the journal (journalctl -u NetworkManager):

Sep 05 10:53:38 dce0bd94a71c NetworkManager[228]: <debug> [1567680818.6972] manager: Activation of 'bond0' requires master device 'linux-br0'
Sep 05 10:53:38 dce0bd94a71c NetworkManager[228]: <info>  [1567680818.6973] audit: op="connection-activate" uuid="7df861cb-37e1-4804-bfb2-305068d10568" name="bond0" pid=1818 uid=0 result="fail" reason="Master device 'bond0' can't be activated: Device unmanaged or not available for activation"

Comment 1 Miguel Duarte Barroso 2019-09-05 10:58:12 UTC
Created attachment 1611910 [details]
create a bond interface having as slave a pre-existent port with IP, and add that bond as a port to a bridge

Comment 2 Miguel Duarte Barroso 2019-09-05 11:03:18 UTC
Fixing the attachment links on the 'Steps to reproduce':

1. start the nmstate container - e.g. ./automation/run-tests.sh --debug-shell
2. interrupt the shell when the tests start. that'll give a shell into the nmstate container
3. provision the activate_eth1.yml attachment => https://bugzilla.redhat.com/attachment.cgi?id=1611909
4. provision the bridge_over_bond_over_slave_single_tx.yml attachment => https://bugzilla.redhat.com/attachment.cgi?id=1611910

Comment 8 Gris Ge 2019-09-25 05:53:41 UTC
I tried 100 times with NetworkManager-1.20.0-3.el8.x86_64, no failure on old version of nmstate.

Clearly the NetworkManager upgrade fixed the auto connect slave problem on activation.

Anyway, no harm introduced for this patch.

Comment 10 errata-xmlrpc 2019-11-05 20:52:21 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-2019:3347


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