Skip to content

Commit 53f066c

Browse files
dgsudharsanjudyjoseph
authored andcommitted
Fix log_ssd_health hang issue (#1904)
What I did Fix sonic-net/sonic-buildimage#9114 The log_ssd_health command hangs due to timeout being used with docker exec -i which also affect warmboot flow. How I did it Added foreground option for timeout. This is recommended when not using the command on shell https://man7.org/linux/man-pages/man1/timeout.1.html How to verify it Run log_ssd_health and verify it does not hang Signed-off-by: Sudharsan Dhamal Gopalarathnam [email protected]
1 parent 57de13b commit 53f066c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/log_ssd_health

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash
22

3-
timeout 30 smartctl -a /dev/sda > /tmp/smartctl
3+
timeout --foreground 30 smartctl -a /dev/sda > /tmp/smartctl
44
if [ -f /tmp/smartctl ];then
55
logger -f /tmp/smartctl
66
fi

0 commit comments

Comments
 (0)