[netcf-devel] Enslaving already enslaved interfaces

David Lutterkort lutter at redhat.com
Mon Aug 10 22:38:27 UTC 2009


On Mon, 2009-08-10 at 11:59 +0200, Jonas Eriksson wrote:
> This breaks the XML schema defined by interface.rng, as there
> should be "oneOrMore" interfaces enslaved by the bonding
> interface.

Indeed, it does; I would only guarantee though that the XML you get from
dumpxml conforms to the schema if the config of your machine is
reasonable (with some hazy definition of reasonable)

If we want to avoid handing out broken XML, the dumpxml call should
probably result in an error like 'config of bond0 is so strange that I
can't even describe it', though even that might be more trouble than
it's worth, since the user can do their own validation and act on that.

You can get to a broken config (in the sense that dumpxml returns
non-conforming XML) by manually editing etc. config files, so we need to
handle that regardless.

> The SUSE driver solves this by raising an error instead of
> taking over enslaved interfaces:
> ---------
> (.. same state as above)
> ncftool> define interface/bridge.xml 
> error: unspecified error
> error: interface eth1 slave of interface bond0, unable to continue
> ncftool> 
> ---------
> 
> Which direction should netcf have for this? My opinion is that
> raising an error would be best, as this would allow for better
> control over the enslaved interfaces. It would also be simpler
> to avoid pitfalls as the bond0 state above.

My concern is that by not allowing to break configs we can easily end up
in a place where getting a machine into a known reasonable state becomes
impossible. For example, I'd want management tools to be able to
discover all ethernet devices on a machine, configure each of them as a
standalone ethernet interface with DHCP, and possibly delete all other
bridge/bond interfaces without regard of what might break in the
process.

At the same time, it would be good to add detailed diagnostics like the
ones you have above - should we think about a 'ncf_check' call that
looks at an XML interface spec and returns warnings like what you have
above for the SuSe driver ?

David




More information about the netcf-devel mailing list