[netcf-devel] Gentoo integration / basic questions

David Lutterkort lutter at redhat.com
Thu Dec 10 00:50:39 UTC 2009


On Tue, 2009-12-08 at 00:28 +0100, elias wrote:
> > netcf is expected to read existing interfaces. For example, Fedora's
> > installer will set up interface config files in
> > /etc/sysconfig/network-scripts, and netcf knows how to parse these and
> > exposes the interface list through its API (and ncftool). If the user
> > creates a config for a bridge interface and drops it in /etc/..., netcf
> > will see that as well.
> I was referring to reading existing interfaces directly from the system, as an 
> interface might even be changed/created by another 3rd party tool like 
> OpenVPN.
> OpenVPN might be one of the more harmless scenarios here as it usually just 
> adds/removes an TUN/TAP interface, but there are a plenty of 3rd party tools 
> out there in the wild which do way more changes.
> I think it would be really important to be able to rely not only on the static 
> interface configuration, as this would limit the usage scope of netcf IMHO 
> quite too much.

Initially, netcf was strictly meant as a tool to munge interface
configuration via ncf_define and ncf_if_xml_desc. Laine added support
for querying 'live' config (i.e., properties of interfaces as they are
running, rather than what's in configuration files) with
ncf_if_xml_state. That works reasonably well, though there's probably
some room for improvement for more esoteric setups.

> As far as I understood netcf now, it doesn't replace a distribution's 
> configuration mechanism, but builds another layer on top of it.
> 
> Wouldn't it be possible to use netcf as a complete replacement?

Since this would be a _huge_ change in any distro, I don't think that
that's realistic - at least for Fedora/RHEL, there are a ton of tools
and lots of knowledge built around the current config format. Netcf
gives you an alternate route to handling those, and because it's
bidirectional, the integration is seamless, in that you can either use
your existing tools or netcf.

> So the initsystem would directly control networking interfaces through netcf 
> without another layer of configuration files - the configuration would be done 
> directly through netcf/XML files.
> 
> This would:
> - simplify network configuration
> - provide optional support in OpenRC as replacement for the basic 'ifconfig'-
> style cross-platform support which was recently introduced and caused a lot of 
> discussions as a lot of people liked the previous config style way more
> - create a de-facto standard for network configurations in initsystems
> 
> Is netcf's architecture ready for using it like this? Can it be decoupled from 
> parsing config files through Augeas and using it just directly?

It's not really what netcf was meant to be, nad to be honest, I think
the chances of success for such an approach are quite slim.

> So all this narrows done to this basic questions:
> - Is netcf able to read the current live configuration of devices outside of 
> the configuration files (through /sys or other mechanisms)?

Some of it - see ncf_if_xml_state.

> - Can netcf be decoupled from Augeas and work just on its own?

There's no hard requirement to write any driver using Augeas; for
Fedora/RHEL, there isn't much point in doing this split.

> - Are there any interests in getting netcf into this direction + do you think 
> it would make sense?

I think it's a gigatic undertaking, with very slim chances of success -
replacing tried and true config mechanisms is a huge battle, and
generally not worth the effort.

David




More information about the netcf-devel mailing list