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 1650221 - [RFE] add a mode "device.no-auto-manage" to mark devices as unmanaged until we have a profile for it
Summary: [RFE] add a mode "device.no-auto-manage" to mark devices as unmanaged until w...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Thomas Haller
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1616363
TreeView+ depends on / blocked
 
Reported: 2018-11-15 15:40 UTC by Thomas Haller
Modified: 2021-01-22 14:04 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-22 14:04:09 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Haller 2018-11-15 15:40:18 UTC
When a user wants to configure a device outside of NetworkManager (iproute2), then the best way is to explicitly configure the device as unmanaged in NetworkManager. This can be done via permanent configuration (NetworkManager.conf, udev, etc) or ad-hoc via `nmcli device set "$DEVICE" managed no`.


Of course, often the user doesn't do that. So, when NM notices that the device is externally configured, then it generates an in-memory profile and goes into pretend-only mode. See https://bugzilla.redhat.com/show_bug.cgi?id=1616363#c3
This "externally-managed" behaviour is complex, confusing and buggy.


Another problem is, when the user does not intend NM to handle the device, NM still touches and interferes. It does so when moving the devices into "disconnected" state. At the very least NM will:
 - set the device as IFF_UP (it does so, because NM wants to receive the state of carrier/cable)
 - it will set IPv6 addr-gen-mode none and accept_ra 0 (because while IFF_UP, the device must be logically disconnected and have no IP configuration. See also bug 1628900).

If the user then wants to configure the device manually, NM already disables IPv6 on the device and otherwise interfered.




This is ultimately because

 - NetworkManager wants to manage devices by default. It assumes that if you run NM, then you want to use it. Also, it currently really wants to get the carrier state and set the device IFF_UP (and interfering with it already).

 - by default (unless "main.no-auto-default" is on), NM will even go so far and generate a default profile that can autoactivate on the device. It really wants to manage this device.



I think we could improve this easily. Add a new option "device.no-auto-manage". This option is per-device (or of course, for every device).

"device.no-auto-manage=1" means, that NM will automatically mark the device as unmanaged until a connection profile for the device exits.


"device.no-auto-manage" implies "main.no-auto-default".


This is more like what systemd-networkd does: the device is unmanaged by default, unless there is a profile for it.



A package like NetworkManager-config-server could install such a configuration snippet. For example /usr/lib/NetworkManager/conf.d/00-server.conf with

  [device-00-server-no-auto-managed]
  # only do this for certain device types:
  match-device=type:ethernet,type:bond,type:bridge
  no-auto-managed=1

an expicit `nmcli device connect` shold still overrule this (including generating a profile, as it currently would).

Comment 1 sushil kulkarni 2019-10-15 16:01:48 UTC
Parking for 8.3 for now.

-Sushil

Comment 6 Antonio Cardace 2021-01-22 14:04:09 UTC
Thank you for reporting this. Unfortunately, we don't have the capacity to fix this in the foreseeable future and therefore I will close this. In case this issue is more important than we estimated, please re-open this or file a new bug.


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