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.
First of all, this is all ugly.
When NetworkManager starts and it finds a device already configured, then there should be two cases only:
- after `systemctl restart NetworkManager`, in `/run/NetworkManager/devices` we remember which devices were active and which profiles were activated. So, after restart, we take over those configuration again (gracefully). The result is to fully manage the devices after restart.
- /run does not indicate that NetworkManager was managed in the device. This is for the first start after boot or (after restart). In that case, NM generates a profile (named like "eth0") and does not touch the device at all. It's a pretend-only mode.
Now, when not running NetworkManager in initrd, then dracut configures the device, drops ifcfg files, and expect NetworkManager to take over. That violates the two nices cases that we would like to have. That is not a problem when running NetworkManager in initrd. There were many issues about this, one of them is bug 1771792.
test match_connections_with_infinite_leasetime was added for bug 1771792.
It fails with:
> Connection 'testG' differs from candidate 'con_general' in 802-3-ethernet.mac-address, ipv4.method, ipv4.gateway, ipv4.addresses
The supposed fix for that is https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/53bb23b403b82bce248018deaa409a8f0aa5d1d4/src/nm-manager.c#L2808
This test doesn't succeed, because the fix requires to find a file `/var/run/initramfs/net.testG.lease` with the dhclient lease file. That file would then be copied to "/run/NetworkManager/dhclient-$UUID-testG.lease".
In that case, you should find a message in log "assume: taking over an initramfs-configured connection"
How about adjusting the test fo have such a file `/var/run/initramfs/net.testG.lease`?
> How about adjusting the test fo have such a file `/var/run/initramfs/net.testG.lease`?
To be precise, I think to make the test hit the right condition, it should suffice to create a file /var/run/initramfs/net.testG.lease. The content doesn't really matter, but it should probably be a "proper" lease file of dhclient.