From a6a4d0110bb95c21138dc190cbfb225d1f2f2da8 Mon Sep 17 00:00:00 2001 From: xiagw Date: Sat, 28 Dec 2024 15:48:20 +0800 Subject: [PATCH] Fix ack.sh script to ensure proper return value when lock file is missing in auto-scaling function. Added a return 1 statement to prevent false positives in scaling checks, enhancing the reliability of the script's operation. --- lib/aliyun/ack.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/aliyun/ack.sh b/lib/aliyun/ack.sh index aed75af..ca0da34 100644 --- a/lib/aliyun/ack.sh +++ b/lib/aliyun/ack.sh @@ -485,6 +485,8 @@ ack_auto_scale() { return 0 fi fi + # 如果锁文件不存在,返回 1(false)【实际测试了bash必须存在这个return 1,否则就算文件不存在也会返回0】 + return 1 } # 检查扩容冷却期