[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 libteam] teamnl: update help message
by Hangbin Liu
Update help message so people could know we support port name directly.
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
utils/teamnl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/utils/teamnl.c b/utils/teamnl.c
index e8de7e2..c53345d 100644
--- a/utils/teamnl.c
+++ b/utils/teamnl.c
@@ -521,7 +521,9 @@ static void print_help(const char *argv0) {
printf(
"%s [options] teamdevname command [command args]\n"
- "\t-h --help Show this help\n",
+ "\t-h --help Show this help\n"
+ "\t-p --port_name team slave port name\n"
+ "\t-a --array_index team option array index\n",
argv0);
printf("Commands:\n");
for (i = 0; i < CMD_TYPE_COUNT; i++) {
--
2.19.2
4 years, 8 months