[netcf-devel] Enslaving already enslaved interfaces

Jonas Eriksson jonas.j.eriksson at ericsson.com
Mon Aug 10 09:59:12 UTC 2009


Hi,

When enslaving an interface already enslaved by another
interface, the initscripts driver overtakes this enslaved
interface:
---------
ncftool> dumpxml bond0
<?xml version="1.0"?>
<interface type="bond" name="bond0">
  <start mode="onboot"/>
  <protocol family="ipv4">
    <ip address="10.0.1.27" prefix="24"/>
  </protocol>
  <bond mode="active-backup">
    <interface type="ethernet" name="eth2"/>
    <interface type="ethernet" name="eth1"/>
  </bond>
</interface>

ncftool> define interface/bridge.xml 
Defined interface br0
ncftool> dumpxml br0
<?xml version="1.0"?>
<interface type="bridge" name="br0">
  <start mode="onboot"/>
  <mtu size="1500"/>
  <protocol family="ipv4">
    <dhcp/>
  </protocol>
  <bridge stp="off" delay="0.01">
    <interface type="ethernet" name="eth1"/>
    <interface type="ethernet" name="eth2"/>
  </bridge>
</interface>

ncftool> dumpxml bond0
<?xml version="1.0"?>
<interface type="ethernet" name="bond0">
  <start mode="onboot"/>
  <protocol family="ipv4">
    <ip address="10.0.1.27" prefix="24"/>
  </protocol>
</interface>

ncftool> 
---------

This breaks the XML schema defined by interface.rng, as there
should be "oneOrMore" interfaces enslaved by the bonding
interface.

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.

Regards,
Jonas

--
Jonas Eriksson
Consultant at AS/EAB/FLJ/IL
Combitech AB
Älvsjö, Sweden


More information about the netcf-devel mailing list