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 1754511 - NetworManager not setting default route on boot when configured on a bond
Summary: NetworManager not setting default route on boot when configured on a bond
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-23 13:02 UTC by mcolombo
Modified: 2023-09-07 20:42 UTC (History)
11 users (show)

Fixed In Version: NetworkManager-1.18.4-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 20:08:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-891 0 None None None 2023-09-07 20:42:02 UTC
Red Hat Product Errata RHBA-2020:1162 0 None None None 2020-03-31 20:08:10 UTC

Description mcolombo 2019-09-23 13:02:04 UTC
Description of problem:
NetworkManager does not set default route if configured on a bond on boot. restarting network post boot will apply the default route

Version-Release number of selected component (if applicable):
NetworkManager-1.18.0-5.el7.x86_64

How reproducible:
Every time

Steps to Reproduce:
1.configure bond with GATEWAY
2.reboot
3.

Actual results:
default route missing and unable to reach system outside local subnet

Expected results:
default route present in routing table and system be fully reachable on and off the network

Additional info:
We currently have 2 cases where customer is hitting this issue. I have attempted to reproduce on a vm without any luck. 1 customer system was configured using NetworkManager and the other was configured by hand using ifcfg file with NetworkManager controlling the network. Disabling NetworkManager resolves the issue. One customer has downgraded NetworkManager to the previous version and issue no longer present.

Comment 2 Beniamino Galvani 2019-09-23 13:23:05 UTC
Hi, can you please ask the customer to set 'level=TRACE' in the [logging] section of /etc/NetworkManager/NetworkManager.conf, reproduce the issue and then provide the output of 'journalctl -b' ? Thanks.

Comment 5 Beniamino Galvani 2019-09-26 09:01:56 UTC
Hi. It seems the issue is caused by the presence of a bond0 interface
before NM starts. The interface is created when the bonding kernel
module is inserted at boot due to file /etc/modules-load.d/bonding.conf.

A possible workaround is:

 echo "options bonding max_bonds=0" > /etc/modprobe.d/bonding-opts.conf

This tells kernel to not create the interface automatically at boot,
but doesn't prevent NM from creating it later when needed. I tested it
in a VM and the default route comes up as expected, while it didn't
without the option.

Still, there is a bug in NM because a full activation of the bond0
connection (as performed by the network.service during boot) should
create the default route. I'm investigating why it doesn't work.

Comment 6 Beniamino Galvani 2019-09-26 11:54:11 UTC
The bug is also present on git master. Reproducer:

#!/bin/sh                                                                                                                                                                         

nmcli connection delete bond0+
nmcli connection add type bond ifname bond0 con-name bond0+ ip4 172.26.1.1 gw4 172.26.1.254

systemctl stop NetworkManager
# clear NM runtime state
rm -rf /var/run/NetworkManager

# create bond0 externally before NM is started
ip link del bond0 2> /dev/null
ip link add bond0 type bond

systemctl start NetworkManager
sleep 10
nmcli connection up bond0+

# now check that default route via gw exists                                                                                                                                      
nmcli connection
ip route

Comment 7 Beniamino Galvani 2019-09-26 11:57:59 UTC
Fix on review at:

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/291

Comment 8 mcolombo 2019-09-26 12:13:10 UTC
Hi,

I very much appreciate your assistance with this. I have another case with a slightly different issue where none of the ip info is being applied to the bond on boot, but gets applied after a restart. After looking over the patch you submitted I suspect it may be related to the issue in this bug. Would it be possible to build a test package with your patch that I can have that customer test?

- Colombo

Comment 10 Thomas Haller 2020-01-22 11:08:58 UTC
this issue was fixed upstream before 1.22.0 (64a9dd38047a)

Also backported to 1.20.10 (722cddfad873) and 1.18.4 (f754f9790032).

This is hence part of rhel-7.8 (1:1.18.4-1)

Comment 13 Vladimir Benes 2020-01-25 11:24:01 UTC
bond_add_default_route_if_bond0_exists test added:
working on both 8.2 and 7.8 well.
failing on 7.7.

    @bond_add_default_route_if_bond0_exists
    Scenario: NM - bond - reconnect device
    * Add a new connection of type "bond" and options "con-name bond0 ifname bond0 ip4 1.2.3.4/24 gw4 1.2.3.1"
    * Stop NM
    * Execute "rm -rf /var/run/NetworkManager"
    * Execute "ip link del bond0 2> /dev/null ; ip link add bond0 type bond"
    * Start NM
    * Bring "up" connection "bond0"
    When "connected" is visible with command "nmcli -g GENERAL.STATE dev show bond0" in "40" seconds
    Then "default" is visible with command "ip r |grep bond0"

Comment 15 errata-xmlrpc 2020-03-31 20:08:02 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-2020:1162


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