Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
When changing an 802-3-ethernet connection's master from bridge to a bond it is not reconnected unless reactivated explicitly (although 802-3-ethernet connection has autoconnect set to true and bond connection has autoconnect-slaves set to 1). Not sure if it is a bug, mistake in config or a missing feature.
Version-Release number of selected component (if applicable):
CentOS Linux release 7.3.1611 (Core)
NetworkManager 1.4.0
How reproducible:
Always
Steps to Reproduce:
1. Create an 802-3-ethernet and bridge connections, 802-3-ethernet connection master is set to the bridge.
2. Interfaces are now autoconnected eth0-br1
3. Create a new connection for bond and change 802-3-ethernet connection master to this new bond.
Actual results:
802-3-ethernet master is still set to bridge.
Expected results:
802-3-ethernet master is set to bond1.
Reproducer script:
import uuid
import dbus
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager/Settings')
settings = dbus.Interface(proxy, 'org.freedesktop.NetworkManager.Settings')
ethernet_conn_settings = dbus.Dictionary({
'connection': dbus.Dictionary({
'id': 'test-eth0',
'interface-name': 'eth0',
'uuid': str(uuid.uuid4()),
'type': '802-3-ethernet',
'autoconnect': True,
'autoconnect-priority': 100,
'master': 'br0',
'slave-type': 'bridge'
})
})
bridge_conn_settings = dbus.Dictionary({
'connection': dbus.Dictionary({
'id': 'test-br0',
'interface-name': 'br0',
'uuid': str(uuid.uuid4()),
'type': 'bridge',
'autoconnect': True,
'autoconnect-priority': 100,
'autoconnect-slaves': True
})
})
settings.AddConnection(ethernet_conn_settings)
settings.AddConnection(bridge_conn_settings)
import time
time.sleep(10)
bond_conn_settings = dbus.Dictionary({
'connection': dbus.Dictionary({
'id': 'test-bond1',
'interface-name': 'bond1',
'uuid': str(uuid.uuid4()),
'type': 'bond',
'autoconnect': True,
'autoconnect-priority': 100,
'master': 'br0',
'slave-type': 'bridge',
'autoconnect-slaves': True
})
})
ethernet_conn = None
ethernet_conn_uuid = None
for conn in settings.ListConnections():
con_proxy = bus.get_object('org.freedesktop.NetworkManager', conn)
settings_connection = dbus.Interface(con_proxy, 'org.freedesktop.NetworkManager.Settings.Connection')
config = settings_connection.GetSettings()
if str(config['connection']['id']) == 'test-eth0':
ethernet_conn = settings_connection
ethernet_conn_uuid = str(config['connection']['uuid'])
ethernet_conn_settings['connection'].update({
'slave-type': 'bond',
'master': 'bond1',
'uuid': ethernet_conn_uuid
})
ethernet_conn.Update(ethernet_conn_settings)
settings.AddConnection(bond_conn_settings)
After running this `ip link` returns:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT qlen 1000
link/ether 52:54:00:e6:eb:82 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
link/ether 52:54:00:e6:eb:82 brd ff:ff:ff:ff:ff:ff
4: bond1: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue master br0 state DOWN mode DEFAULT qlen 1000
link/ether 8e:9c:29:a5:54:4d brd ff:ff:ff:ff:ff:ff
ethernet connection:
[root@localhost tmp]# nmcli con show test-eth0
...
connection.master: bond1
connection.slave-type: bond
...
Comment 2Beniamino Galvani
2017-07-26 14:43:16 UTC
Comment 5Beniamino Galvani
2017-09-28 12:30:03 UTC
In general when a connection is changed the new settings are effective
only after reactivation of the connection. Here the master of a slave
connection is changed while the connection is active and then the new
master (with autoconnect-slaves=yes) is brought up. The question is
whether NM should automatically reactivate the slave connection on the
new master.
In version 1.8.0, NM would unconditionally reactivate the slave when
autoconnect-slaves=yes. We noticed that this could lead to race
conditions: for example if a user activated the master and the slave
within short time, the slave auto-activation could preempt th slave
activation requested by user and make it fail, which is certainly
wrong.
This scenario was fixed in 1.8.2 and now NM doesn't disconnect an
active connection just to auto-connect it again. I believe this is an
acceptable behavior and I would suggest to change the script to
explicitly reactivate a connection when changes are done to it.
Any other opinions about this?
Comment 6Beniamino Galvani
2018-03-24 09:44:44 UTC
*** This bug has been marked as a duplicate of bug 1548265 ***
Description of problem: When changing an 802-3-ethernet connection's master from bridge to a bond it is not reconnected unless reactivated explicitly (although 802-3-ethernet connection has autoconnect set to true and bond connection has autoconnect-slaves set to 1). Not sure if it is a bug, mistake in config or a missing feature. Version-Release number of selected component (if applicable): CentOS Linux release 7.3.1611 (Core) NetworkManager 1.4.0 How reproducible: Always Steps to Reproduce: 1. Create an 802-3-ethernet and bridge connections, 802-3-ethernet connection master is set to the bridge. 2. Interfaces are now autoconnected eth0-br1 3. Create a new connection for bond and change 802-3-ethernet connection master to this new bond. Actual results: 802-3-ethernet master is still set to bridge. Expected results: 802-3-ethernet master is set to bond1. Reproducer script: import uuid import dbus bus = dbus.SystemBus() proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager/Settings') settings = dbus.Interface(proxy, 'org.freedesktop.NetworkManager.Settings') ethernet_conn_settings = dbus.Dictionary({ 'connection': dbus.Dictionary({ 'id': 'test-eth0', 'interface-name': 'eth0', 'uuid': str(uuid.uuid4()), 'type': '802-3-ethernet', 'autoconnect': True, 'autoconnect-priority': 100, 'master': 'br0', 'slave-type': 'bridge' }) }) bridge_conn_settings = dbus.Dictionary({ 'connection': dbus.Dictionary({ 'id': 'test-br0', 'interface-name': 'br0', 'uuid': str(uuid.uuid4()), 'type': 'bridge', 'autoconnect': True, 'autoconnect-priority': 100, 'autoconnect-slaves': True }) }) settings.AddConnection(ethernet_conn_settings) settings.AddConnection(bridge_conn_settings) import time time.sleep(10) bond_conn_settings = dbus.Dictionary({ 'connection': dbus.Dictionary({ 'id': 'test-bond1', 'interface-name': 'bond1', 'uuid': str(uuid.uuid4()), 'type': 'bond', 'autoconnect': True, 'autoconnect-priority': 100, 'master': 'br0', 'slave-type': 'bridge', 'autoconnect-slaves': True }) }) ethernet_conn = None ethernet_conn_uuid = None for conn in settings.ListConnections(): con_proxy = bus.get_object('org.freedesktop.NetworkManager', conn) settings_connection = dbus.Interface(con_proxy, 'org.freedesktop.NetworkManager.Settings.Connection') config = settings_connection.GetSettings() if str(config['connection']['id']) == 'test-eth0': ethernet_conn = settings_connection ethernet_conn_uuid = str(config['connection']['uuid']) ethernet_conn_settings['connection'].update({ 'slave-type': 'bond', 'master': 'bond1', 'uuid': ethernet_conn_uuid }) ethernet_conn.Update(ethernet_conn_settings) settings.AddConnection(bond_conn_settings) After running this `ip link` returns: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT qlen 1000 link/ether 52:54:00:e6:eb:82 brd ff:ff:ff:ff:ff:ff 3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000 link/ether 52:54:00:e6:eb:82 brd ff:ff:ff:ff:ff:ff 4: bond1: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue master br0 state DOWN mode DEFAULT qlen 1000 link/ether 8e:9c:29:a5:54:4d brd ff:ff:ff:ff:ff:ff ethernet connection: [root@localhost tmp]# nmcli con show test-eth0 ... connection.master: bond1 connection.slave-type: bond ...