From cc362695f3066303296ea66f0a95f1ba2cf56e9b Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Tue, 10 Mar 2020 09:43:32 +0200 Subject: [PATCH 1/2] [mellanox] enable watchdog before fast-reboot On newer CPLDs this script will enabled hardware watchdog and set timeout to 600 sec. On older CPLDs this script will fail saying it does not support mellanox watchdog type 1, however fast-reboot won't fail as by the time this script is called all services are down, so better to do fast reboot any way as it was before rathen then failing the whole fast reboot process and leaving system in failed state. Signed-off-by: Stepan Blyschak --- scripts/watchdog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/watchdog b/scripts/watchdog index 3737ca7688..b207b94d4c 100644 --- a/scripts/watchdog +++ b/scripts/watchdog @@ -63,7 +63,9 @@ function disable_watchdog() fi elif isMLNX; then debug "Calling MLNX WD disable" - # call watchdog api for mlnx + if [[ -x /usr/bin/hw-management-wd.sh ]]; then + /usr/bin/hw-management-wd.sh stop + fi else if isArista; then debug "Calling Arista WD disable" @@ -84,7 +86,9 @@ function enable_watchdog() fi elif isMLNX; then debug "Calling MLNX WD enable" - # call watchdog api for mlnx + if [[ -x /usr/bin/hw-management-wd.sh ]]; then + /usr/bin/hw-management-wd.sh start + fi else if isArista; then debug "Calling Arista WD enable" From a1262f2a28344c618a7db0cb3ae7d8529eb12819 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Tue, 28 Apr 2020 19:19:03 +0300 Subject: [PATCH 2/2] [mlnx] change default watchdog timeout to 3 min Signed-off-by: Stepan Blyschak --- scripts/watchdog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/watchdog b/scripts/watchdog index b207b94d4c..19c9cbdbfa 100644 --- a/scripts/watchdog +++ b/scripts/watchdog @@ -87,7 +87,7 @@ function enable_watchdog() elif isMLNX; then debug "Calling MLNX WD enable" if [[ -x /usr/bin/hw-management-wd.sh ]]; then - /usr/bin/hw-management-wd.sh start + /usr/bin/hw-management-wd.sh start 180 fi else if isArista; then