(Created page with "{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To read it, choose the "view source" link.<br/> '''Copy the source to a ''new page'' before making changes! DO NOT EDIT THIS TEMPLATE FOR YOUR CHANGE PROPOSAL.'''}} {{admon/tip | Guidance | For details on how to fill out this form, see the [https://docs.fedoraproject.org/en-US/program_management/change...") |
(update release note tracker) |
||
(12 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name. This keeps all change proposals in the same namespace --> | <!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name. This keeps all change proposals in the same namespace --> | ||
= Migrate NetworkManager ifcfg profiles to keyfile = | = Migrate NetworkManager ifcfg profiles to keyfile = | ||
== Summary == | == Summary == | ||
Line 19: | Line 11: | ||
== Current status == | == Current status == | ||
[[Category: | [[Category:ChangeAcceptedF39]] | ||
<!-- When your change proposal page is completed and ready for review and announcement --> | <!-- When your change proposal page is completed and ready for review and announcement --> | ||
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler --> | <!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler --> | ||
Line 36: | Line 28: | ||
ON_QA -> change is fully code complete | ON_QA -> change is fully code complete | ||
--> | --> | ||
* [ | * [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/63CQ4LAOHOBSMF5JB3JG3K6X76G7CW74/ devel thread] | ||
* FESCo issue: | * FESCo issue: https://pagure.io/fesco/issue/3043 | ||
* Tracker bug: | * Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2233268 #2233268] | ||
* Release notes tracker: | * Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/1005 #1005] | ||
== Detailed Description == | == 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. | 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 [https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh | Since [https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh Fedora Linux 33], NetworkManager writes profiles by default in the keyfile format. Also, since [https://fedoraproject.org/wiki/Changes/NoIfcfgFiles Fedora Linux 36] 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 [https://lists.freedesktop.org/archives/networkmanager/2023-May/000103.html deprecated]. This means that the code will only receive bug fixes, and will not get new functionality such as supporting new properties | The upstream NetworkManager project has recently declared the ifcfg plugin as [https://lists.freedesktop.org/archives/networkmanager/2023-May/000103.html deprecated]. This means that the code will only receive bug fixes, and will not get new functionality such as supporting new properties. | ||
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. In Fedora, we plan to drop the plugin by Fedora Linux 41. | |||
== Benefit to Fedora == | == 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: | 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 | $ 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. | 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. | 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. | 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 == | == Scope == | ||
* Proposal owners: | * Proposal owners: introduce a migration service and ship it with the `NetworkManager-initscripts-ifcfg-rh` package | ||
* | * Other developers: N/A | ||
* | * Release engineering: N/A | ||
* | * Policies and guidelines: N/A | ||
* | * Trademark approval: N/A | ||
== Upgrade/compatibility impact == | == Upgrade/compatibility impact == | ||
The majority of users will not be impacted by the change. Only users that meet all the following criteria will be affected: | |||
* the user is upgrading from a previous Fedora version | |||
* the user has the the NetworkManager-initscripts-ifcfg-rh package installed | |||
* the user has at least one connection profile stored in ifcfg format | |||
Since keyfile was made the default in Fedora 33, and ifcfg was dropped from new installations in Fedora 36, the only scenarios in which users meet those criteria are: | |||
* the user originally installed Fedora 32 or a previous version | |||
* the user installed Fedora 33 or later, then manually switched the default plugin to “ifcfg-rh” in the configuration and then added new connections | |||
* the user installed Fedora 36 or later, explicitly installed the NetworkManager-initscripts-ifcfg-rh package, manually switched the default plugin to “ifcfg-rh” in the configuration and then added new connections | |||
== How To Test == | |||
* Install the NetworkManager-initscripts-ifcfg-rh package | |||
* Restart NetworkManager | |||
* Migrate a connection to ifcfg-rh via nmcli: `nmcli connection migrate --plugin ifcfg-rh $NAME` | |||
* Check that the migration had effect with `nmcli -f name,filename connection`: the profile should now be stored in `/etc/sysconfig/network-scripts` | |||
* Upgrade to Fedora 39 | |||
* Check that all profiles are now stored in `/etc/NetworkManager/system-connections` in keyfile format. | |||
== User Experience == | == User Experience == | ||
For users that are affected by the migration, there should not be any observable change in behavior. The keyfile format supports a superset of the features supported by ifcfg. Furthermore, the migration is done by the NetworkManager daemon using the same code path used to store new connections in keyfile format. Any bug in the migration would also affect the creation of new connections. | |||
If users have custom scripts or tools that parse the ifcfg files, those will break and need to be adjusted. One notable example of such tools is in package `initscripts-rename-device`, which provides a udev helper to rename interfaces based on the MAC and interface name found in ifcfg files. Users relying on this mechanism will need to switch to systemd .link files (or udev rules) to perform the renaming. | |||
The release notes for the Fedora version shipping this change will mention these aspects. | |||
== Dependencies == | == Dependencies == | ||
N/A | |||
== Contingency Plan == | == Contingency Plan == | ||
* Contingency mechanism: Revert the change, try again the next Fedora release. | |||
* Contingency mechanism: | * Contingency deadline: Beta freeze | ||
* Blocks release? no | |||
* Contingency deadline: | |||
* Blocks release? | |||
== Documentation == | == Documentation == | ||
No doc change required. | |||
== Release Notes == | == Release Notes == | ||
The change will be mentioned in the Release Notes. | |||
Release Notes | |||
Latest revision as of 23:22, 28 September 2023
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-09-28
- devel thread
- FESCo issue: https://pagure.io/fesco/issue/3043
- Tracker bug: #2233268
- Release notes tracker: #1005
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 Fedora Linux 33, NetworkManager writes profiles by default in the keyfile format. Also, since Fedora Linux 36 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.
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. In Fedora, we plan to drop the plugin by Fedora Linux 41.
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: introduce a migration service and ship it with the
NetworkManager-initscripts-ifcfg-rh
package
- Other developers: N/A
- Release engineering: N/A
- Policies and guidelines: N/A
- Trademark approval: N/A
Upgrade/compatibility impact
The majority of users will not be impacted by the change. Only users that meet all the following criteria will be affected:
- the user is upgrading from a previous Fedora version
- the user has the the NetworkManager-initscripts-ifcfg-rh package installed
- the user has at least one connection profile stored in ifcfg format
Since keyfile was made the default in Fedora 33, and ifcfg was dropped from new installations in Fedora 36, the only scenarios in which users meet those criteria are:
- the user originally installed Fedora 32 or a previous version
- the user installed Fedora 33 or later, then manually switched the default plugin to “ifcfg-rh” in the configuration and then added new connections
- the user installed Fedora 36 or later, explicitly installed the NetworkManager-initscripts-ifcfg-rh package, manually switched the default plugin to “ifcfg-rh” in the configuration and then added new connections
How To Test
- Install the NetworkManager-initscripts-ifcfg-rh package
- Restart NetworkManager
- Migrate a connection to ifcfg-rh via nmcli:
nmcli connection migrate --plugin ifcfg-rh $NAME
- Check that the migration had effect with
nmcli -f name,filename connection
: the profile should now be stored in/etc/sysconfig/network-scripts
- Upgrade to Fedora 39
- Check that all profiles are now stored in
/etc/NetworkManager/system-connections
in keyfile format.
User Experience
For users that are affected by the migration, there should not be any observable change in behavior. The keyfile format supports a superset of the features supported by ifcfg. Furthermore, the migration is done by the NetworkManager daemon using the same code path used to store new connections in keyfile format. Any bug in the migration would also affect the creation of new connections.
If users have custom scripts or tools that parse the ifcfg files, those will break and need to be adjusted. One notable example of such tools is in package initscripts-rename-device
, which provides a udev helper to rename interfaces based on the MAC and interface name found in ifcfg files. Users relying on this mechanism will need to switch to systemd .link files (or udev rules) to perform the renaming.
The release notes for the Fedora version shipping this change will mention these aspects.
Dependencies
N/A
Contingency Plan
- Contingency mechanism: Revert the change, try again the next Fedora release.
- Contingency deadline: Beta freeze
- Blocks release? no
Documentation
No doc change required.
Release Notes
The change will be mentioned in the Release Notes.