[netcf-devel] Undefining a bridge does not recreate the original interface
Cole Robinson
crobinso at redhat.com
Wed Oct 28 17:51:28 UTC 2009
Hi all,
Playing with netcf a bit, I'm hitting an issue with undefining a bridge:
the original interface disappears from the ncftool --list output, and
its ifcfg script is completely gone.
$ sudo cat /etc/sysconfig/network-scripts/ifcfg-wlan0
# Networking Interface
DEVICE=wlan0
HWADDR=00:1C:BF:04:29:A4
ONBOOT=no
TYPE=wireless
$ cat netcfbridge.xml
<interface type="bridge" name="testbr0">
<start mode="none"/>
<mtu size="1500"/>
<protocol family="ipv4">
<dhcp/>
</protocol>
<bridge stp="off" delay="0.01">
<interface type="ethernet" name="wlan0">
<mac address="00:1C:BF:04:29:A4"/>
</interface>
</bridge>
</interface>
$ sudo src/ncftool
ncftool> list --all
eth0
lo
wlan0
ncftool> define netcfbridge.xml
Defined interface testbr0
ncftool> list --all
eth0
lo
testbr0
ncftool> dumpxml testbr0
<?xml version="1.0"?>
<interface type="bridge" name="testbr0">
<start mode="none"/>
<mtu size="1500"/>
<protocol family="ipv4">
<dhcp/>
</protocol>
<bridge stp="off" delay="0.01">
<interface type="ethernet" name="wlan0">
<mac address="00:1C:BF:04:29:A4"/>
</interface>
</bridge>
</interface>
ncftool> undefine testbr0
testbr0 undefined
ncftool> list --all
eth0
lo
Maybe netcf could attempt to rebuild ifcfg files for child interfaces
when undefining? Since it is already accessing /sys, it should be
straight forward to build a simple config with at least mac and
interface name.
On an unrelated note, the bridge XML example on the main trac page is
outdated and doesn't match the current XML schema.
Thanks,
Cole
More information about the netcf-devel
mailing list