[Networkmanager] Deprecating the ifcfg-rh plugin

Beniamino Galvani bgalvani at redhat.com
Tue May 30 20:03:14 UTC 2023


Hi,

with this mail I would like to announce the intention of deprecating
the ifcfg-rh plugin in NetworkManager.

* What is the ifcfg-rh plugin?

NetworkManager supports different backends (also called "plugins"
since they are implemented as shared objects) for reading and writing
connection profiles:

 - keyfile: stores the profiles in
   {/etc,/usr/lib,/run}/NetworkManager/system-connections in a
   INI-style format (also called "keyfile" format). This plugin is
   preferred on most distros and supports all the feature that
   NetworkManager supports.

 - ifcfg-rh: profiles are stored in /etc/sysconfig/network-scripts and
   contain key-value pairs expressed as shell variables. In the past,
   this has been the preferred plugin for many years on Red Hat
   distros; however, in the past years those distros have switched to
   keyfile as preferred plugin.

 - ifupdown: used on Debian-based distros.

* Why it is being deprecated?

The most important reason for deprecating ifcfg-rh is that it has a
maintenance burden and we would like to invest that effort on other
areas; the ifcfg-rh plugin, due to its format, always requires
considerable work when implementing new properties. On the other hand,
keyfile requires much less effort because the format closely matches
the structure of a connection profile.

Keyfile is a better format, is distro-independent, supports all the
features and is also much easier to edit manually; for these reasons
we would like to see it used everywhere.

* What does this mean in practice?

The deprecation will involve these changes:

 - the ifcfg-rh plugin will no longer be enabled by default at build
   time when a Red Hat compatible distro is detected; users will still
   be able to enable it explicitly;

 - from now on, the ifcfg-rh code will still receive bug fixes but
   will not be updated to implement new features;

 - if a connection profile which contains one of the new unsupported
   properties needs to be saved in ifcfg-rh format, an error will be
   raised; to continue, users will need to migrate the connection to
   keyfile using the "nmcli connection migrate" command;

 - NetworkManager will log a deprecation warning at startup when
   connections exist in ifcfg-rh format.

Note that the ifcfg-rh code is not going away for now, it's only
switching to maintenance-only mode.

* What is the timeline?

The changes described above are going to be implemented in the current
development cycle, and will be included in the next major release of
NetworkManager (1.44.0).

* What to do if I still have ifcfg-rh files?

The best way forward is to convert those connections to keyfiles.
Since version 1.38, NetworkManager supports the "nmcli connection
migrate" command for this purpose; the migration is done by the
NetworkManager daemon itself and doesn't need any additional step
(such as a connection reload or a service restart). See this blog
post for more information:

  https://fedoramagazine.org/converting-networkmanager-from-ifcfg-to-keyfiles/

Beniamino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/networkmanager/attachments/20230530/1345963d/attachment.sig>


More information about the Networkmanager mailing list