Migrate NetworkManager ifcfg profiles to keyfile
Summary
Migrate NetworkManager network connection profiles stored in ifcfg format to the keyfile format.
Owner
- Name: Beniamino Galvani, Fernando Fernández Mancera, Till Maas
- Email: <bgalvani@redhat.com>, <ferferna@redhat.com>, <till@fedoraproject.org>
Current status
- Targeted release: Fedora Linux 39
- Last updated: 2023-06-27
- [<will be assigned by the Wrangler> devel thread]
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
NetworkManager supports different formats to persist connection profiles to disk. On Fedora the two formats used are keyfile and ifcfg. The former stores connections in {/etc,/usr/lib,/run}/NetworkManager/system-connections
in a format similar to INI files. Connections in ifcfg format are compatible with the legacy network scripts and are saved in /etc/sysconfig/network-scripts
as a collection of shell variables. Not all connection types are supported by ifcfg, and NetworkManager always uses the keyfile format for unsupported types.
Since Fedora33, NetworkManager writes profiles by default in the keyfile format. Also, since Fedora36 the plugin to persist ifcfg files is included in a separate package (NetworkManager-initscripts-ifcfg-rh
) and is not shipped in new installations.
The upstream NetworkManager project has recently declared the ifcfg plugin as deprecated. This means that the code will only receive bug fixes, and will not get new functionality such as supporting new properties. In Fedora, we plan to drop the plugin by Fedora 41.
With this change, existing profiles in ifcfg format will be automatically migrated to the native keyfile format via a migration service shipped with the NetworkManager-initscripts-ifcfg-rh
package.
Benefit to Fedora
Until recently, both keyfile and ifcfg supported the same set of properties. With the ifcfg deprecation, new properties are only implemented for the keyfile plugin and not for ifcfg. When users try to set an unsupported property on a ifcfg profile, they get an error:
`
$ nmcli connection modify ethernet-enp1s0 link.tx-queue-length 1234 Error: Failed to modify connection 'ethernet-enp1s0': failed to update connection: The ifcfg-rh plugin doesn't support setting 'link'. If you are modifying an existing connection profile saved in ifcfg-rh format, please migrate the connection to keyfile using 'nmcli connection migrate c3f6f067-e1d5-4bb1-8d67-e09109253a79' or via the Update2() D-Bus API and try again.
`
At the moment there are only 4 unsupported properties but the list is going to increase with time. Furthermore, ifcfg support will be dropped in future versions of NetworkManager.
The benefit of this change is that users having ifcfg files will be migrated to the more modern and future-proof format supporting all the functionalities offered by NetworkManager.
Scope
- Proposal owners:
- Other developers:
- Release engineering: #Releng issue number
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Community Initiatives:
Upgrade/compatibility impact
How To Test
User Experience
Dependencies
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change), Yes/No
Documentation
N/A (not a System Wide Change)