From Fedora Project Wiki
(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:
{{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/changes_guide/ documentation].}}
{{admon/tip | Report issues | To report an issue with this template, file an issue in the [https://pagure.io/fedora-pgm/pgm_docs pgm_docs repo].}}
<!-- 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 =
{{Change_Proposal_Banner}}


== Summary ==
== Summary ==
Line 19: Line 11:


== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[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
-->
-->
* [<will be assigned by the Wrangler> devel thread]
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/63CQ4LAOHOBSMF5JB3JG3K6X76G7CW74/ devel thread]
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: https://pagure.io/fesco/issue/3043
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2233268 #2233268]
* Release notes tracker: <will be assigned by the Wrangler>
* 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 Fedora33], NetworkManager writes profiles by default in the keyfile format. Also, since [https://fedoraproject.org/wiki/Changes/NoIfcfgFiles Fedora36] the plugin to persist ifcfg files is included in a separate package (`NetworkManager-initscripts-ifcfg-rh`) and is not shipped in new installations.
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. In Fedora, we plan to drop the plugin by Fedora 41.
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.


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
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
* Other developers: <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Other developers: N/A
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->


* Policies and guidelines: N/A (not needed for this Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: N/A
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. Please submit a pull request with the proposed changes before submitting your Change proposal. -->


* Trademark approval: N/A (not needed for this Change)
* Policies and guidelines: N/A  
<!-- If your Change may require trademark approval (for example, if it is a new Spin), file a ticket ( https://pagure.io/Fedora-Council/tickets/issues ) requesting trademark approval from the Fedora Council. This approval will be done via the Council's consensus-based process. -->


* Alignment with Community Initiatives:  
* Trademark approval: N/A
<!-- Does your proposal align with the current Fedora Community Initiatives: https://docs.fedoraproject.org/en-US/project/initiatives/ ? It's okay if it doesn't, but it's something to consider -->


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
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


== How To Test ==
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:
<!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done.  If it needs to be tested with different hardware or software configurations, indicate them.  The more specific you can be, the better the community testing can be.


Remember that you are writing this how to for interested testers to use to check out your change implementation - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your change.
* 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


A good "how to test" should answer these four questions:


0. What special hardware / data / etc. is needed (if any)?
== How To Test ==
1. How do I prepare my system to test this change? What packages
need to be installed, config files edited, etc.?
2. What specific actions do I perform to check that the change is
working like it's supposed to?
3. What are the expected results of those actions?
-->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* 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 ==
<!-- If this change proposal is noticeable by users, how will their experiences change as a result?
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.


This section partially overlaps with the Benefit to Fedora section above. This section should be primarily about the User Experience, written in a way that does not assume deep technical knowledge. More detailed technical description should be left for the Benefit to Fedora section.
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.


Describe what Users will see or notice, for example:
The release notes for the Fedora version shipping this change will mention these aspects.
  - Packages are compressed more efficiently, making downloads and upgrades faster by 10%.
  - Kerberos tickets can be renewed automatically. Users will now have to authenticate less and become more productive. Credential management improvements mean a user can start their work day with a single sign on and not have to pause for reauthentication during their entire day.
- Libreoffice is one of the most commonly installed applications on Fedora and it is now available by default to help users "hit the ground running".
- Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
-->


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->
N/A
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 


== Contingency Plan ==
== Contingency Plan ==


<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency mechanism: Revert the change, try again the next Fedora release.
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency deadline: Beta freeze
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Blocks release? no
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
 


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
No doc change required.
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)


== Release Notes ==
== Release Notes ==
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are at https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/ -->
The change will be mentioned in the Release Notes.
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this change, indicate them here.  A link to upstream documentation will often satisfy this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release.
 
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
-->

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

Current status

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.