Bug 2177214 - connection.secondaries not updated after secondary connection removal, keeping stale UUID's there
Summary: connection.secondaries not updated after secondary connection removal, keepin...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: NetworkManager
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: NetworkManager Development Team
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-10 12:29 UTC by David Jaša
Modified: 2023-07-04 09:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-04 09:17:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-375 0 None None None 2023-03-10 12:30:12 UTC
Red Hat Issue Tracker RHELPLAN-151433 0 None None None 2023-03-10 12:30:16 UTC
freedesktop.org Gitlab NetworkManager NetworkManager-ci merge_requests 1357 0 None opened connection.feature: secondaries: name with space, auto removal 2023-03-10 12:29:24 UTC

Description David Jaša 2023-03-10 12:29:25 UTC
Description of problem:
connection.secondaries not updated after secondary connection removal, keeping stale UUID's there

Version-Release number of selected component (if applicable):
NetworkManager-1.42.2-1.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. have a connection with empty connection.secondaries and an e.g. VPN connection
2. Add VPN connection to base's connection.secondaries
3. delete VPN connection

Actual results:
UUID of a deleted VPN connection is still in base connection's connection.secondaries

Expected results:
UUID of deleted secondary connection is deleted from respective base connections' connection.secondaries entries

Additional info:
Already covered by NMCI scenario connection_secondaries_are_cleared_after_removal in the linked MR.

sort of similar situation is in controller/port connections, however there may be NM users depending on the current behaviour:

$ nmcli c add con-name bond0+ ifname bond0 type bond connection.autoconnect no
Connection 'bond0+' (619ef611-14f1-47e6-92cf-c580727a28dd) successfully added.
$ nmcli c add con-name bond0.10+ ifname eth10 type ethernet connection.autoconnect no master bond0+
Connection 'bond0.10+' (c6f2b280-26f1-42c3-bc50-4f475ee6a819) successfully added.
$ UUID=$(nmcli -g connection.uuid c s bond0+)
$ nmcli -f all c s bond0.10+ | grep "$UUID\|bond0+"
connection.master:                      619ef611-14f1-47e6-92cf-c580727a28dd
$ nmcli c del bond0+
Connection 'bond0+' (619ef611-14f1-47e6-92cf-c580727a28dd) successfully deleted.
$ nmcli -f all c s bond0.10+ | grep "$UUID\|bond0+"
connection.master:                      619ef611-14f1-47e6-92cf-c580727a28dd
$

Comment 1 David Jaša 2023-03-15 15:24:46 UTC
> however there may be NM users depending on the current behaviour

Doing this as an unconditional change would clash with internal NM architecture and doing it just for secondaries would bring inconsistent behaviour. Therefore I'm self-closing this bug. In the future, I may write a feature request for an option to "nmcli c delete" which could be the same for any similar relationships and could be implemented just in NM clients (libnm, nmcli...).

Comment 2 sfaye 2023-07-04 09:17:28 UTC
Closing this bug based on comment 1. 
Thanks David.


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