Bug 2039734

Summary: autoconnect-retries doesn't work as expected with multiconnect profiles
Product: Red Hat Enterprise Linux 9 Reporter: Beniamino Galvani <bgalvani>
Component: NetworkManagerAssignee: Fernando F. Mancera <ferferna>
Status: CLOSED ERRATA QA Contact: Filip Pokryvka <fpokryvk>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 9.0CC: bgalvani, ferferna, fpokryvk, jbastian, lrintel, mhoyer, pbunyan, rkhan, sfaye, sukulkar, thaller, till, vbenes, wenliang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.43.3-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:37:53 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:
Bug Depends On:    
Bug Blocks: 2183217    

Description Beniamino Galvani 2022-01-12 10:24:25 UTC
Description of problem:

If a connection profile has connection.multi-connect=multiple, then the number of autoconnect retries is global across all connection attempts for the profile; instead it should be per-device.

Version-Release number of selected component (if applicable):
1.35.3, and any previous NM version since connection.multi-connect was introduced

Steps to Reproduce:

1. Prepare a machine with two interfaces eth0 and eth1 connected to a network without DHCP server
2. Create a connection profile with connection.multi-connect=multiple, connection.autoconnect-retries=2 and without interface name
3. Check that at boot the connection starts on both devices

Actual results:

4. After the connection fails on eth0, it is retried one time
5. After the connection fails on eth1, it is not retried because eth0 already decreased the autoconnect counter for the profile

Expected result:

4. After the connection fails on eth0, it is retried one time
5. After the connection fails on eth1, it is retried one time

Additional info:

In NM 1.26, nm-initrd-generator used to create profiles with 4 autoconnect retries and a DHCP timeout of 45 seconds. That means that for profiles bound to a single device NM would wait in the initramfs for 45*4=180 seconds. However, due to this bug, if the profile had multiconnect enabled (as for `ip=dhcp`) then some devices could wait 45s, some more, depending on the number of devices and activation order.

Since NM 1.30, nm-initrd-generator creates profiles with autoconnect-retries=1 and a DHCP timeout of 90 seconds, so this issue is no longer visible because each devices tries exactly one time.

However, the issue is still present for non-initramfs activations.

Comment 5 Filip Pokryvka 2022-11-18 15:15:46 UTC
Current patch makes connection never fail and retrying inifinitely, hence FailedQA.

Comment 9 Beniamino Galvani 2022-12-05 13:30:17 UTC
The change also affect some initrd use cases, see bug 2150000.

Comment 13 Thomas Haller 2022-12-20 15:14:17 UTC
*** Bug 2143978 has been marked as a duplicate of this bug. ***

Comment 14 Thomas Haller 2022-12-20 17:25:35 UTC
(In reply to Filip Pokryvka from comment #5)
> Current patch makes connection never fail and retrying inifinitely, hence
> FailedQA.

patch has been reverted upstream:
`main`: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/aec7ae8279cc9b3de7e75140b75fe997f43700fc
`nm-1-40`: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/ba663123669ae1a5670e4a85ce2cf520fea875f6

that should fix regressions like bug 2143978 (one it reaches rhel8/rhel9).

The bug goes back to NEW/ASSIGNED.

Comment 15 Filip Pokryvka 2023-01-09 17:51:11 UTC
Note for QE: the test already is prepared, just add commented-out steps and adjust version in connection_multiconnect_autoconnect_retries test.

Comment 24 errata-xmlrpc 2023-11-07 08:37:53 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 (NetworkManager 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-2023:6585