[netcf-devel] Undefining a bridge does not recreate the original interface

Daniel P. Berrange berrange at redhat.com
Wed Oct 28 18:30:21 UTC 2009


On Wed, Oct 28, 2009 at 01:51:28PM -0400, Cole Robinson wrote:
> 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

I'd argue that this should have in fact failed, because the 
consituent interface in the bridge definition was already a
defined primary interface.

I think netcf should have required the caller to explictly
undefine wlan0 here first, rather than secretly undefining
it as a side-effect of defining testbr0.

This would then obviously mean that when later undefining
testbr0, there would be no question of re-defining wlan0

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


More information about the netcf-devel mailing list