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 1452046 - [NMCI] nmcli_general_set_device_back_to_managed failed
Summary: [NMCI] nmcli_general_set_device_back_to_managed failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Francesco Giudici
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-18 08:41 UTC by Francesco Giudici
Modified: 2018-04-10 13:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 13:24:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0778 0 None None None 2018-04-10 13:26:21 UTC

Description Francesco Giudici 2017-05-18 08:41:47 UTC
NetworkManager CI Failure

Comment 2 Francesco Giudici 2017-05-19 10:16:48 UTC
The issue seems triggered when a connection with LL IPv6 address still tentative is shut down as a consequence of the underlying device set to not managed. When a connection will be later again attached to the underlying device (so bringing it back in managed state) it will end up not generating the LL IPv6 address.

To reproduce locally:
* default ethernet connection A already up on interface eth0
# nmcli con down A
# nmcli con up A; nmcli device set eth0 managed no
# nmcli con up A

There will not be IPv6 address on eth0.

Comment 3 Francesco Giudici 2017-06-01 16:15:35 UTC
Digged more, found two issues, the first one detailed above and another one that makes the test fail:
1) The first issue is due to a race when upping and setting the device to unmanaged immediately.
In particular, if connection is upped and immediately device is set unmanaged, NM-internal device IP config is cleared due to the device unmanaged, but the platform event of the new IP6 address caused from the connection up, is got AFTER that, causing NM to recreate the internal IP6 config for the device (which is unmanaged).
When then the connection is upped again, when starting IPv6ll, NetworkManager wrongly founds an already present IPv6ll address for the device, so will skip generation of a new one: so no IPv6 address will be added.

2) When a device is unmanaged and then NetworkManager is restarted, it will recall that the device was unmanaged: anyway, if an IP6ll address is already configured on the device, the device internal device IP config will be populated with and the IP config will not be cleaned when setting the device unmanaged.
So, the same issue as in 1) (no IPv6) will happen when a connection for that device is upped.
To reproduce issue 2):
# nmcli con up A
# nmcli device set eth0 managed no
# service NetworkManager restart
# nmcli con up A

Comment 4 Francesco Giudici 2017-06-12 16:03:53 UTC
Device ip configuration is tracked by NetworkManager also when the device is not managed: despite not interfering with it, NetworkManager will keep tracking events from platform to expose on DBUS the ip configuration of the unmanaged device.

Both the issues described in c3 are caused by a race that happens when the IPv6LL address is removed and the device is being configured in NetworkManager: when checking if an IPv6LL address is there, if the address removal event has not already been processed, NetworkManager will be fooled that an IPv6LL address is already there, skipping IPv6LL generation.

Before checking for IPv6 addresses, check if there is some IPv6 event from platform waiting for being processed: if so do it immediately in order to do the check with up-to-date information.

branch: fg/ipv6_add_sync-rh1452046

Comment 5 Francesco Giudici 2017-06-17 21:30:46 UTC
The problem with this issue is that IPv6LL address will eventually be cleared if performing a "full" connection activation, as the one triggered by a "nmcli connection A up". If the device was already managed, it will correctly undergo a ip clear process at the very beginning of the activation.
Otherwise, it will be moved to the internal "managed" state later on, so skipping clearing of the internal device state and with it the IPv6LL address generation when needed as the current IPv6LL address will be cleared later.

Proper fix should be to mark the device as managed earlier if an explicit connection activation is performed on a device which was unmanaged or assumed. This would allow to let the device undergo the full clear process and avoid skipping IPv6LL address generation.

Please ignore fg/ipv6_add_sync-rh1452046 and instead review new branch:

fg/ipv6_add_sync-rh1452046-II

Comment 8 Thomas Haller 2017-06-20 14:13:34 UTC
fg/ipv6_add_sync-rh1452046-II lgtm

Comment 10 Red Hat Bugzilla Rules Engine 2017-06-20 16:02:12 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Comment 15 errata-xmlrpc 2018-04-10 13:24:24 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-2018:0778


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