[PATCH 0/3] RFC: stop using netcf for the interface driver backend

Laine Stump laine at redhat.com
Fri Jan 22 08:01:54 UTC 2021


This is a followup to my message in December suggesting that we
deprecate use of the netcf package:

https://www.redhat.com/archives/libvir-list/2020-December/msg00183.html

(or Message-Id: <4889202b-734c-4d0f-472c-d86894319878 at redhat.com> for
those of you who keep a local archive)

Each of these patches takes a baby step in the direction of removing
netcf from libvirt:

1) makes it possible to explicitly disable netcf in a build without
   uninstalling netcf-devel.

2) makes netcf=disabled the default for all normal builds

3) switches all RHEL/Fedora/CentOS rpm builds to disable netcf, and no
   longer require that netcf and netcf-devel be installed.

I purposefully didn't include a patch to completely remove all traces
of netcf; we can leave it disabled for awhile before taking that step.

Much of the basic functionality provided by the netcf backend to the
interface driver is also provided by the udev backend which is used
when netcf isn't available.

Some differences:

1) the udev backend can't make any modifications to host interface
   configuration. It is only useful for reading a list of host network
   devices, and querying some basic status of those interfaces (*not*
   the contents of configuration files, but how the interface is
   currently setup)

2) With the netcf backend, "virsh iface-list --all" shows a list of
   those interfaces that have an ifcfg-blah file in
   /etc/sysconfig/network-scripts. With the udev backend, the same
   command shows a list of all network devices currently on the host,
   as provided by the udev function

     udev_enumerate_add_match_subsystem(enumerate, "net")

  (with some exceptions - see udeevGetDevices()). This means that, for
  example, the bridge devices created by libvirt for virtual networks
  (virbrX) will show in the list when using udev.

3) The udev backend doesn't fill in IP address info about the devices
   in the output of "virsh iface-dumpxml" (netcf does).

4) The udev driver *does* go to the trouble of filling in the MTU of
   every interface, even when it is the default value of 1500.

In the end, all the information it reports is correct (well, item (2)
is debatable - it depends on what you would use the info for), but it
is different, which is why I'm sending this as an RFC - I'd appreciate if
people can build and try running something like this script with
existing libvirt as well as with the patches applied:

  http://people.redhat.com/lstump/ncfresults

and compare the before/after.

The real question is whether or not this difference really "makes a
difference" to anyone. My guess/hope is that the answer to this is
"no". As far as I know, there aren't any management applications that
use the virInterface API (even virt-manager has stopped) so it's
probably only humans using virsh that encounter it.

(If it's considered important, we could 1) filter out the bridge
devices used by libvirt virtual networks, and 2) copy the netcf code
that fills in IP address info. I don't want to spend time doing that
if nobody's going to use it anyway, though.)


Laine Stump (3):
  build: support explicitly disabling netcf
  build: make netcf=disabled the default
  rpm: disable netcf for the interface driver on RHEL/Fedora/CentOS

 libvirt.spec.in | 8 ++------
 meson.build     | 9 ++++++---
 2 files changed, 8 insertions(+), 9 deletions(-)

-- 
2.29.2




More information about the libvir-list mailing list