Bug 1858439
Summary: | Write NetworkManager 'keyfile' configs to installed system | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Adam Williamson <awilliam> |
Component: | anaconda | Assignee: | Radek Vykydal <rvykydal> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | anaconda-maint-list, jkonecny, jonathan, kellin, rvykydal, thaller, vanmeeuwen+fedora, vponcova, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | openqa | ||
Fixed In Version: | anaconda-33.25-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-08-11 18:28:21 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: | 1857391 |
Description
Adam Williamson
2020-07-18 01:04:30 UTC
during installation, anaconda is also welcome to run NetworkManager with a configuration snippet [main] plugins=ifcfg-rh At least as a quick remedy. Granted, that results in files still created in ifcfg-rh format. But that is still fine. rh#1857391 is about changing the default, and prefer keyfile. But if anaconda wishes to handle ifcfg files, it may do so. Indeed, if I'm right about what's going on, that should work too. Thomas, is there any pattern for config files we should copy to installed system (ie "nmconnection" suffix) ? Or should we copy the content of the /etc/NetworkManager/system-connections ? For ifcfg we copy DEVICE_CONFIG_FILE_PREFIXES = ("ifcfg-", "keys-", "route-") keyfiles reside under /{usr/lib,run,etc}/NetworkManager/system-connections. Under /usr/lib and /run, the files *MUST* have a ".nmconnection" extension. For historical reasons, that is not required under /etc/NetworkManager/system-connections. NetworkManager would write new files with that extension, however, if you update an existing profile, it would not forcefully rename the file. Also, theoretically there can be certificate files which NetworkManager could have written to /etc/NetworkManager/system-connections. So, you basically copy all the files there. There really should be no irrelevant files in that directory. To be precise, some filenames (like leading "." or ".??????" suffix) are never valid keyfiles. However, they might still be important, for example as ".$UUID.nmmeta" files. The code that checks valid filenames is at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/24c534225faa786a0a4a4cda6744659493354183/libnm-core/nm-keyfile/nm-keyfile.c#L4253 . See the "require_extension" argument, which is TRUE for /{usr/lib,run}/ but false for /etc. This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33. So this looks to be working: the openQA tests that were failing started passing today. Let's hope it doesn't have any unexpected effects, but looks good for now. |