[ISSUE] Failed to find "enabled" option.
by Xin Long
I found this err in "loadbalance" and "lacp" runner when adding ports.
It's caused by trying to set "enabled" option in .port_link_changed()
or .port_changed().
When a new port is added, the first 'port changed event' process is
earlier than CMD TEAM_CMD_OPTIONS_GET, in this CMD, all
the options are synchronized from kernel.
It means there's no 'enabled' option yet when calling port_link_changed
in the first 'port changed event' process. In lb_event_watch_port_link_changed
and lacp_event_watch_port_changed, they call teamd_port_check_enable
to set 'enabled' option. this err is triggered.
I'm not sure why teamd_port_check_enable needs to check if
'enabled' option exists. I checked the ab's .port_link_changed(),
it just sets it by calling team_set_port_enabled(), instead of
checking 'enabled' option first.
can we just use team_set_port_enabled to set it directly in
.port(_link)_changed OR improve teamd_port_check_enable
to avoid this err ?
Thanks.
4 years
[PATCH resend] examples: fix duplex comparison against best port
by Marcelo Ricardo Leitner
Signed-off-by: Marcelo Ricardo Leitner <mleitner(a)redhat.com>
---
examples/python/team_daemon.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/python/team_daemon.py b/examples/python/team_daemon.py
index 476306ef9b248dc23df5212311c8289d6a334e2d..2d2a74f2f96151465b31c38e961faaf922fbcafc 100755
--- a/examples/python/team_daemon.py
+++ b/examples/python/team_daemon.py
@@ -146,7 +146,7 @@ class TeamDaemon(object):
if port.linkup:
if (not best or
port.speed > best.speed or
- (port.speed == best.speed and port.duplex > port.duplex)):
+ (port.speed == best.speed and port.duplex > best.duplex)):
best = port
if best:
self._change_active_port(active, best)
--
2.14.3
5 years, 9 months
[PATCH] examples: fix duplex comparison against best port
by Marcelo Ricardo Leitner
Signed-off-by: Marcelo R. Leitner <mleitner(a)redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <mleitner(a)redhat.com>
---
examples/python/team_daemon.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/python/team_daemon.py b/examples/python/team_daemon.py
index 476306ef9b24..2d2a74f2f961 100755
--- a/examples/python/team_daemon.py
+++ b/examples/python/team_daemon.py
@@ -146,7 +146,7 @@ class TeamDaemon(object):
if port.linkup:
if (not best or
port.speed > best.speed or
- (port.speed == best.speed and port.duplex > port.duplex)):
+ (port.speed == best.speed and port.duplex > best.duplex)):
best = port
if best:
self._change_active_port(active, best)
--
2.14.3
5 years, 9 months