Re: [PATCH] teamd: Disregard current state when considering port
enablement
by Jiri Pirko
Wed, Nov 13, 2019 at 02:26:47PM CET, petrm(a)mellanox.com wrote:
>On systems where carrier is gained very quickly, there is a race between
>teamd and the kernel that sometimes leads to all team slaves being stuck in
>enabled=false state.
>
>When a port is enslaved to a team device, the kernel sends a netlink
>message marking the port as enabled. teamd's lb_event_watch_port_added()
>calls team_set_port_enabled(false), because link is down at that point. The
>kernel responds with a message marking the port as disabled. At this point,
>there are two outstanding messages: the initial one marking port as
>enabled, and the second one marking it as disabled. teamd has not processed
>either of these.
>
>Next teamd gets the netlink message that sets enabled=true, and updates its
>internal cache accordingly. If at this point ethtool link-watch wakes up,
>teamd considers (in teamd_port_check_enable()) enabling the port. After
>consulting the cache, it concludes the port is already up, and neglects to
>do so. Only then does teamd get the netlink message informing it of setting
>enabled=false.
>
>The problem is that the teamd cache is not synchronous with respect to the
>kernel state. If the carrier takes a while to come up (as is normally the
>case), this is not a problem, because teamd caches up quickly enough. But
>this may not always be the case, and particularly on a simulated system,
>the carrier is gained almost immediately.
>
>Fix this by not suppressing the enablement message.
>
>Signed-off-by: Petr Machata <petrm(a)mellanox.com>
applied. Thanks!
3 years, 2 months
[PATCH libteam] utils/bond2team: keep delivering config to file if stdout not supplied
by Hangbin Liu
When --stdout not supplied, we should keep on delivering the config file
instead of return.
Before the fix:
$ bond2team --configdir ./bonding/ --master bond0 --rename team0
$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0
$ ls teaming/
After the fix:
$ bond2team --configdir ./bonding/ --master bond0 --rename team0
Resulted files:
/tmp/bond2team.nV4eX3/ifcfg-team0
/tmp/bond2team.nV4eX3/ifcfg-eth1
/tmp/bond2team.nV4eX3/ifcfg-eth2
$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0
$ ls teaming/
ifcfg-eth1 ifcfg-eth2 ifcfg-team0
Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
utils/bond2team | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/bond2team b/utils/bond2team
index fc81c4b..28733da 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -623,7 +623,7 @@ team_ifcfg_write()
team_ifcfg_deliver()
{
pr_dbg "${FUNCNAME} $*"
- if ! to_stdout; then
+ if to_stdout; then
return 0
fi
--
2.25.4
3 years, 4 months
[PATCH libteam] utils/bond2team: remove TYPE in ifcfg file
by Hangbin Liu
When convert Bond config to Team, TYPE is used for Bond and DEVICETYPE
is used for Team. So we should remove TYPE keyword in ifcfg file.
Before the fix:
$ ls bonding/
ifcfg-bond0 ifcfg-bond0-eth1 ifcfg-bond0-eth2
$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE
TYPE=Bond
DEVICETYPE="Team"
TYPE=Ethernet
DEVICETYPE="TeamPort"
TYPE=Ethernet
DEVICETYPE="TeamPort"
Afther the fix:
$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE
DEVICETYPE="Team"
DEVICETYPE="TeamPort"
DEVICETYPE="TeamPort"
Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
utils/bond2team | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/bond2team b/utils/bond2team
index 28733da..2aae3f5 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -331,7 +331,7 @@ vfile_load_ifcfg()
oIFS="$IFS"
IFS=$'\n'
VFILE=( $(LANG=C \
- grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|DEVICETYPE\|TEAM' \
+ grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \
$ifcfg ))
IFS="$oIFS"
}
--
2.25.4
3 years, 4 months
Re: Possible implementation issue of passive mode lacp
by Jiri Pirko
Fri, Jul 17, 2020 at 05:02:33AM CEST, mghosh(a)cdot.in wrote:
>
>-------------------------------------------------------------------------------
>::Disclaimer::
>-------------------------------------------------------------------------------
>
>The contents of this email and any attachment(s) are confidential and intended
>for the named recipient(s) only. It shall not attach any liability on C-DOT.
>Any views or opinions presented in this email are solely those of the author
>and may not necessarily reflect the opinions of C-DOT. Any form of
>reproduction, dissemination, copying, disclosure, modification, distribution
>and / or publication of this message without the prior written consent of the
>author of this e-mail is strictly prohibited. If you have received this email
>in error please delete it and notify the sender immediately.
>-------------------------------------------------------------------------------
Sorry, but I'm not reading emails with this attached to. Get rid of it
and send it again.
3 years, 4 months