1From 6875e6c8efb0fe86766b3d4f1d0db390af6998b7 Mon Sep 17 00:00:00 2001 2From: Hangbin Liu <liuhangbin@gmail.com> 3Date: Tue, 15 Dec 2020 19:33:17 +0800 4Subject: [PATCH] teamd: increase the waitting time for daemon killing 5 6In the current code, we wait for at most 5s when kill the daemon pid. 7But in some environment, it may need more time. Then the teamd -k will 8failed and return error "Failed to kill daemon: Timer expired". 9 10Let's increase the value to have enough time. Here is the reuslt with 11this patch: 12 13$ time libteam/teamd/teamd -k -t team0 14 15real 0m10.442s 16user 0m0.017s 17sys 0m0.016s 18 19Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> 20Signed-off-by: Jiri Pirko <jiri@nvidia.com> 21--- 22 teamd/teamd.c | 2 +- 23 1 file changed, 1 insertion(+), 1 deletion(-) 24 25diff --git a/teamd/teamd.c b/teamd/teamd.c 26index 9360cbf..b310140 100644 27--- a/teamd/teamd.c 28+++ b/teamd/teamd.c 29@@ -1858,7 +1858,7 @@ int main(int argc, char **argv) 30 break; 31 case DAEMON_CMD_KILL: 32 if (daemon_pid_file_is_running() > 0) { 33- err = daemon_pid_file_kill_wait(SIGTERM, 5); 34+ err = daemon_pid_file_kill_wait(SIGTERM, 30); 35 if (err) 36 teamd_log_warn("Failed to kill daemon: %s", 37 strerror(errno)); 38