From 10a6701d7134a93930c84e1555714e8863218e8c Mon Sep 17 00:00:00 2001 From: Tiago Leal Date: Fri, 29 Sep 2023 12:28:27 -0300 Subject: [PATCH] Fix timeout command in ceph-init-wrapper When analyzing the ceph-process-states.log file, we observed a recurring error scenario. In the /etc/init.d/ceph-init-wrapper osd.0 script, the 'timeout' was consistently failing with error code 125 on the execute_ceph_cmd function call. This failure was due to the absence of a mandatory value parameter, causing 'timeout' to interpret 'ceph' as an invalid time interval. To solve this bug, we introduced the necessary initialization of the $WAIT_FOR_CMD variable. This ensures that the command is executed correctly, addressing the issue and preventing the recurrence of the 'timeout' error." Test Plan: - PASS: Force the disk process to be reported as hung and check the aforementioned log for the desired output. Closes-Bug: 2037728 Change-Id: Ic337b212b74c0cc76f25f4aaf9a99d77f8d9250d Signed-off-by: Tiago Leal --- ceph/ceph/files/ceph-init-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceph/ceph/files/ceph-init-wrapper.sh b/ceph/ceph/files/ceph-init-wrapper.sh index 59367480f..637856740 100755 --- a/ceph/ceph/files/ceph-init-wrapper.sh +++ b/ceph/ceph/files/ceph-init-wrapper.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2019-2023 Wind River Systems, Inc. +# Copyright (c) 2019-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -329,7 +329,7 @@ log_and_kill_hung_procs () # monitoring interval wlog $name "INFO" "Increasing log level" - execute_ceph_cmd ret $name "ceph daemon $name config set debug_$type 20/20" + WAIT_FOR_CMD=10 execute_ceph_cmd ret $name "ceph daemon $name config set debug_$type 20/20" monitoring=$MONITORING_INTERVAL while [ $monitoring -gt 0 ]; do if [ $(($monitoring % $TRACE_LOOP_INTERVAL)) -eq 0 ]; then