netcf-devel  

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

Hugh O. Brock
Wed, 28 Oct 2009 13:23:34 -0700

On Wed, Oct 28, 2009 at 02:54:19PM -0400, Laine Stump wrote:
> 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
> >

Yes, doing it this way would bring us back to the principle of least
surprise. Laine, would this be difficult?

--H

-- 
========================================================
Hugh Brock, hbr...@redhat.com, +1-215-564-3232
Deltacloud API + Portal http://deltacloud.org
Libvirt virtualization library http://libvirt.org
========================================================
Register now for Red Hat Virtual Experience, December 9.
Enterprise Linux, virtualization, cloud, and more.
http://www.redhat.com/virtualexperience
_______________________________________________
netcf-devel mailing list
netcf-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel