[netcf-devel] Undefining a bridge does not recreate the original interface
Laine Stump
laine at laine.org
Wed Oct 28 18:54:19 UTC 2009
On 10/28/2009 02:30 PM, Daniel P. Berrange wrote:
> 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.
>
Yes, I agree with this. That way nobody would be able to accidentally
define over the top of a config without at least acknowledging they were
losing the original information.
> 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
>
More information about the netcf-devel
mailing list