Description of problem:
When using other network controllers on a host, it is required to transfer ownership of certain devices from NM.
Currently, this is possible by editing ifcfg device files with the NM_CONTROLLED key.
Unfortunately this is not sufficient for several reasons, most outstanding one is when the network controller is not using ifcfg files for managing its devices.
A direct API/Command is required to instruct NM to release ownership from a device, persistently and without a dependency on ifcfg initscripts.
This RFE is triggered by the need of RHV host agent (VDSM) to operate in conjunction with NetworkManager, each owning their own devices and not interfering with each other.
Is this for devices that are initially setup by NetworkManager but then NM should let them go and not touch them anymore?
Can you elaborate on that usecase? Note that device which use (say) DHCP need something to babysit the address leases. How is that supposed to work with NetwokrManager stopping to care about the device?
(In reply to Thomas Haller from comment #2)
> Is this for devices that are initially setup by NetworkManager but then NM
> should let them go and not touch them anymore?
> Can you elaborate on that usecase? Note that device which use (say) DHCP
> need something to babysit the address leases. How is that supposed to work
> with NetwokrManager stopping to care about the device?
Any subsequent implications of taking the device ownership is up to the controller that has requested it.
In a simplistic manner, the controller will just define everything from scratch on the device through whichever means it wants (ifcfg, iproute2, netlink).
From the NM side, it should try to gracefully cleanup when releasing ownership: In the DHCP case, I guess this involves taking down the dhclient that it spawned or deamonizing that run (if it is not yet so).
IMO, killing the dhclient is enough.
But it should better not flush existing addresses and other settings.
The simplest usecase I can think of is this:
- Host networking settings are defined by NM.
- Install a controller.
- Controller is issued a command to use several devices:
- Reads current kernel configuration.
- Instructs NM to release ownership of the devices.
- Check that NM is not owning it (in case the previous is not blocking)
- Controller configures the devices as instructed and owns them.
- Controller can return ownership to NM and configure the connection.
please review th/device-release-rh1371433
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.