lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Aug 2009 08:43:52 +0200
From:	Jiri Pirko <jpirko@...hat.com>
To:	Jay Vosburgh <fubar@...ibm.com>
Cc:	Nicolas de Pesloüan 
	<nicolas.2p.debian@...e.fr>, netdev@...r.kernel.org,
	davem@...emloft.net, bonding-devel@...ts.sourceforge.net
Subject: Re: [Bonding-devel] [PATCH net-next-2.6] bonding: introduce
	primary_lazy option

Mon, Aug 24, 2009 at 07:35:17PM CEST, fubar@...ibm.com wrote:
>Jiri Pirko <jpirko@...hat.com> wrote:
>
>>Mon, Aug 24, 2009 at 05:07:18PM CEST, nicolas.2p.debian@...e.fr wrote:
>>> Jiri Pirko wrote:
>>>> Thu, Aug 20, 2009 at 02:40:07PM CEST, nicolas.2p.debian@...e.fr wrote:
>>> [--cut--]
>>>>> I suggest that instead of having a per bond "primary_lazy" option, we
>>>>> define a per slave option, describing whether this particular slave is
>>>>> "sticky when active" or not.
>>>>>
>>>>> The above setup would become :
>>>>>
>>>>> echo 1 > /sys/class/net/eth0/bonding/sticky_active
>>>>> echo 1 > /sys/class/net/eth1/bonding/sticky_active
>>>>> echo 0 > /sys/class/net/eth2/bonding/sticky_active
>>>>> echo eth0 > /sys/class/net/bond0/bonding/primary
>>>>>
>>>>> Or may be better, keeping the "weight" idea in mind, a per slave option
>>>>> "active_weight" that gives the weight of the slave, *when active*.
>>>>>
>>>>> The effective weight of a slave would become :
>>>>>
>>>>> effective_slave =
>>>>> (is_active ? user_supplied_active_weight ? user_supplied_weight) *
>>>>> natural_weight
>>>>>
>>>>> # Prefer eth0, then one of eth1 or eth2, then eth3.
>>>>> echo 1000 > /sys/class/net/eth0/bonding/weight
>>>>> echo 999 > /sys/class/net/eth1/bonding/weight
>>>>> echo 999 > /sys/class/net/eth2/bonding/weight
>>>>> echo 10 > /sys/class/net/eth3/bonding/weight
>>>>>
>>>>> # Do not switch back to primary eth0 if eth1 or eth2 is active.
>>>>> echo 1000 > /sys/class/net/eth1/bonding/active_weight
>>>>> echo 1000 > /sys/class/net/eth2/bonding/active_weight
>>>>>
>>>>> Every time one changes the user_supplied_weight, then
>>>>> user_supplied_active_weight must be reset to the same value. This 
>>>>> way,  if no special setup is done on active_weight, then the current 
>>>>> normal
>>>>> behavior is achieved.
>>>>
>>>> I must say I like this approach. But it would be not trivial to implement this.
>>>> Therefore I would stick with your propose of extending primary lazy to 3 values
>>>> until the weight option is implemented.
>>>
>>> It sounds good for me. Later, if I eventually implement the weight 
>>> option, it shouldn't be that hard to convert internally the primary_lazy 
>>> setup to active_weight, the same way we plan to convert internally 
>>> primary setup to weight setup.
>>>
>>> primary and primary_lazy are convenient for simple - two slaves only -  
>>> configurations. weight and active_weight are for more advanced 
>>> configurations. Keeping both configuration interface does sound user 
>>> friendly.
>>
>>Ok, I agree.
>>
>>>
>>>> I'm going to implement your propose below.
>>>
>>> By the way, even if I'm not a native English speaker, I think that 
>>> primary_lazy option should be named lazy_primary instead.
>>
>>Well I've intentionally put "primary" as a first word to amplify it's linked
>>with primary option... But...
>
>	I'm still unclear as to why it's better to add another special
>case option to bonding instead of changing this in user space, other
>than it'd be a change to user space (initscripts / sysconfig).
>
>	The way I see it, this patch is adding a mechanism that says,
>effectively, "make slave X the active slave, but do it only once."
>There is already a way to do that in bonding (sysfs, as above, or
>ifenslave -c); I am reluctant to add another without good reason.

Hello Jay.

As I already replied you once it's not only about selecting a slave at the
start. It's also about following:

Imagine you have bond with 3 slaves:
eth0            eth1            eth2
UP(curr)        UP              UP
DOWN            UP(curr)        UP
UP              UP(curr)        UP
UP              DOWN            UP(curr)

eth2 ends up being current active but we prefer eth0 (as primary interface).
This is not desirable and is solved by primary_lazy option.

Jirka

>
>	I'm not necessarily against the "weight" business in general.
>For the purposes of this discussion, however, it's a big complex
>solution to a pretty simple problem, and the "weight" system still has
>to have special sauce added it to to handle this special case.
>
>	Last, presuming for the moment that this goes forward as an
>option to bonding, I think this should be named something along the
>lines of "make_active" (or perhaps "make_active_once", but that's a bit
>long).  The option has the effect of making the specified slave the
>active slave one time, then the option setting is cleared.
>
>	-J
>
>---
>	-Jay Vosburgh, IBM Linux Technology Center, fubar@...ibm.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ