Bug 1650228

Summary: [RFE] improve `nmcli device $DEVICE managed no` to release device
Product: Red Hat Enterprise Linux 8 Reporter: Thomas Haller <thaller>
Component: NetworkManagerAssignee: Thomas Haller <thaller>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: acardace, atragler, bgalvani, fgiudici, jmaxwell, lrintel, pasik, rkhan, sukulkar, thaller, till
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-22 14:05:23 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: 1616363    

Description Thomas Haller 2018-11-15 16:02:17 UTC
Clearly, `nmcli device "$DEVICE" managed no` should mark the device as unmanaged, prevent NM from touching it further and let the user do something with it. That works.


However, it's not well defined in which state the device is left to the user:


- if the device is currently in disconnected state, maybe NM should restore the previous state.
Should it set the device as `ip link set down` (!IFF_UP)? Possibly it should especially if the device was down before NM touched it.
Should it reset accept_ra 1 and ipv6 addr-gen-mode eui64? Possibly it should, but that might be undesirable if the device is not also down (!IFF_UP) because suddenly the device is reachable.

- if the device is currently active with a profile, should NM leave the device in a disconnected state, or should it leave all IP configuration as is? (possibly just stopping the DHCP client). Note, that when the DHCP client stops, the addresses will eventually time out. That seems right, the user is supposed to take over quickly. Note, that usually we re-request a least early enough, so that at any time it would be expected that the address lifetimes are still valid for quite a bit (until the DHCP server just died).

- if the device is externally managed, then NM is currently not touching the device. Likewise, NM should not touching it when giving it up.




The question for the desired behavior here is up to definition. In general, we should leave the device in a state that is most suitable for the user to take over.




In particular I find it problematic that we configure IPv6 addr-gen-mode none on devices while being disconnected. In that case, the device has no IPv6 link-local address (as it is logically disconnected). But when giving this up, we must reset the interface to a workable state. Most users won't be aware that when they take over the device, they need to properly configure it (including setting addr-gen-mode).

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

-Sushil

Comment 6 Antonio Cardace 2021-01-22 14:05:23 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.