Tue, Mar 05, 2019 at 04:41:56AM CET, liuhangbin@gmail.com wrote:
As we don't have a default value for link_watch.interval. If user forgot to set this parameter, teamd will failed to init port priv and exit at the end.
e.g. teamd -g -c '{"runner":{"name":"activebackup"},"link_watch":{"name":"arp_ping","target_host":"198.51.100.1"}}' teamdctl team0 port add p5p1 teamdctl team0 port add p5p2
teamd debug log shows: p5p2: Got link watch from global config. p5p2: Using sticky "0". Failed to get "interval" link-watch option. Failed to load options. Failed to init port priv. Callback named "lw_periodic" not found. Callback named "lw_socket" not found. Loop callback failed with: Invalid argument Failed loop callback: libteam_events, 0x5624c28b9410 select() failed. Exiting... Removed loop callback: usock_acc_conn, 0x5624c28bab60 Removed loop callback: usock, 0x5624c28b9410 Removed loop callback: workq, 0x5624c28b9410 Removed loop callback: libteam_events, 0x5624c28b9410 Removed loop callback: daemon, 0x5624c28b9410 Failed: Bad file descriptor
Fix it by adding a default value for link_watch.interval.
v2: update default value to 1000, as Jamie Bainbridge suggested.
Reported-by: LiLiang liali@redhat.com Signed-off-by: Hangbin Liu liuhangbin@gmail.com
Applying: teamd: add a default value 1000 for link_watch.interval error: patch failed: man/teamd.conf.5:308 error: man/teamd.conf.5: patch does not apply error: patch failed: teamd/teamd_lw_psr.c:28 error: teamd/teamd_lw_psr.c: patch does not apply Patch failed at 0001 teamd: add a default value 1000 for link_watch.interval Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".