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 696939 - keyfile: uuid and id fields should be optional for configuration files created by people
keyfile: uuid and id fields should be optional for configuration files create...
Status: RESOLVED DUPLICATE of bug 683345
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-03-31 00:36 UTC by Pavel Simerda
Modified: 2014-07-09 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2013-03-31 00:36:18 UTC
The minimal [connection] section of keyfile connection configuration looks like:

[connection]
id=...
uuid=...
type=...

The only significant item there is the 'type'. Others are just NetworkManager boilerplate.

The 'id' attribute should default to the filename. Unless a specific 'id' is used, filenames in /etc/NetworkManager/system-connections are unique and there's no reason not to use them as the default value. Of course it can be overriden by something fancy and pretty like "Ethernet connection 1".

Administrators should never be asked to generate 'uuid' for new connections. There is a bunch of possibilites what could be done for connection keyfiles without uuid:

1) It could be written there whenever the connection is read. Simple but ugly.

2) It could be stored in a separate file that would link the file name to the uuid.

3) It could be a hash of the filename. Probably the most elegant way.

This bug report specifically applies to administrators who prefer writing configuration files by hand.
Comment 1 Dan Williams 2013-04-03 13:25:54 UTC
This is likely fine, we'd need to do what the ifcfg-rh plugin does for creating the ID and UUID dynamically, which is to create a UUID from the filename since filenames must be unique.  The ID comes from the filename too.

Note that if you then renamed the file, the UUID changes, and then all sorts of stuff gets reset, like your saved DHCP leases are gone, last-connected timestamp is reset to 0, and seen-bssids are cleared, because all of this is based on the UUID.

I have no problem with the administrator not being required to write an ID or UUID, but we should at least write the UUID (and maybe the ID, maybe not) out to the file whenever it gets modified.
Comment 2 Pavel Simerda 2013-04-03 13:38:38 UTC
Agreed.
Comment 3 Pavel Simerda 2013-05-06 14:21:10 UTC

*** This bug has been marked as a duplicate of bug 683345 ***