After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772414 - [RFE] keyfile directories, non-persistant storage and provisioned connections
[RFE] keyfile directories, non-persistant storage and provisioned connections
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on: 744711
Blocks: nm-next
 
 
Reported: 2016-10-04 16:39 UTC by Thomas Haller
Modified: 2019-07-17 11:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-10-04 16:39:18 UTC
Currently, we have

  (1) in-memory connections
  (2) keyfiles in user-config (/etc/NetworkManager/system-connections)

but we need more:

  (3) keyfiles generated for example during bootup, in
      /var/run/NetworkManager/connections.d/

  (4) keyfiles provisioned, say from RPM to
      /usr/lib/NetworkManager/connections.d/)


the new location (4) should be read-only to NetworkManager. Location (3) migth be read-only or not (still undecided).

When loading connection, we would load them in order (4) (3) (2).
I am not sure about whether to read (3) or (2) first, but first (3) seems better.

Connection equality is based on the UUID, thus connections from later locations hide/shadow connections from earlier locations.

When the user modifies/deletes a connection in (4), we should store to (2) the changed connection (or the fact that the connection is deleted/hidden).
Or maybe we should generally disallow modifying these connections(?).

When the user modifies a connection (3), we could either
  - change the file in location (3)
  - disallow changing/deleting operation for these connections
  - hide them via (2).



Use of (4) (/usr/lib/NetworkManager/connection.d)
-------------------------------------------------

The use of (4) are pre-installed connections. Say, a company distributes an RPM with the Wi-Fi settings.

Another use could be:
If we would be to allow one connection to activate on multiple devices, we could install a package that provides a default-wired-connection. We could thus re-design our default-wired-thing to instead have a keyfile installed.



Use of (3) (/var/run/NetworkManager/connection.d)
-------------------------------------------------

a generator script could run and create connections that only exist during the lifetime of the current boot. Say, connections from initrd could be persisted to /var/run/NetworkManager/connection.d for NetworkManager to use afterwards.
Comment 1 Thomas Haller 2016-10-04 16:39:46 UTC
first we should fix bug 744711
Comment 2 Thomas Haller 2016-10-23 10:59:26 UTC
see also: https://bugzilla.gnome.org/show_bug.cgi?id=773069#c8
Comment 3 Sebastien Bacher 2019-05-24 08:49:28 UTC
The case (3) was fixed in https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/ce4dbd7daf right?
Comment 4 Thomas Haller 2019-07-17 11:22:24 UTC
this got now fixed by commit [1]. See also the merge request [2].

As this is a large rework, expect some fall out and there will be follow-up fixes necessary...




[1] https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=d35d3c468a304c3e0e78b4b068d105b1d753876c

[2] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/189