Re: [PATCH 8/9] ifcfg: Ignore higher level configs for bonding slaves



On Tue, 2011-10-11 at 14:32 -0500, Dan Williams wrote:
> On Tue, 2011-10-11 at 16:23 +0200, Thomas Graf wrote:

> > I am very much open to a better implementation regarding this and I
> > think your proposal is much cleaner.
> > 
> > To make sure I understood you properly: You propose to replace any
> > existing IP config with a "IP disabled"-config before entering stage1
> > while activating a bonding slave. Right?
> 
> Well, I'd assume the bond's IPv4 config is already disabled?  Or do we
> allow separate IP configs on the bond slaves in addition to the master?
> I've heard of this for bridging but not necessarily for bonding.

Nope, that should be disallowed. This is basically what the patch does,
it adds a "disabled" ip config to the settings and skip any ip config
provided.

> But anyway, there are two choices if the bond has an IPv4 config: either
> that's invalid and we don't let the connection pass validation (in
> libnm-util/nm-setting-ip4-config.c's verify() method), or having this is
> valid and we should deal with it now or in the future.

I currently chose to ignore ip config to keep the required changes when
adding an interface to a bond and remove it again trivial. I am also OK
with enforcing that no ip configuration is allowed at all.

> Right.  If the config is invalid and we don't allow this, then we make
> sure the connection fails validation in verify() in
> nm-setting-ip4-config.c, and then we make sure to document this so that
> the UI knows it's not possible.  This is the same thing we do for PPP,
> where 99% of the time as a client you cannot set the IP address, because
> it's provided for you by upstream and it would be pointless to set one
> of your own.  Same thing for bonding; the UI should just disable the
> options.

OK but we still need the dummy ip config. I'd much rather have the
settings specify whether to do IP respectively fall back to DHCP instead
having to add special cases everywhere to add exceptions.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]