From 5af1bfe1427e83e33b119cc2f3466c4557b5f470 Mon Sep 17 00:00:00 2001 From: Wes Date: Sat, 27 May 2023 21:15:45 +0000 Subject: [PATCH] Move alert generation outside of the inner loop --- salt/curator/tools/sbin_jinja/so-curator-cluster-delete-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/curator/tools/sbin_jinja/so-curator-cluster-delete-delete b/salt/curator/tools/sbin_jinja/so-curator-cluster-delete-delete index 388c32b0d..0beed1a59 100755 --- a/salt/curator/tools/sbin_jinja/so-curator-cluster-delete-delete +++ b/salt/curator/tools/sbin_jinja/so-curator-cluster-delete-delete @@ -58,10 +58,10 @@ while overlimit && [[ $ITERATION -lt $MAX_ITERATIONS ]]; do exit fi ((ITERATION++)) + done if [[ $ITERATION -ge $MAX_ITERATIONS ]]; then alert_id=$(uuidgen) printf "\n$(date) -> Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold. Writing alert ($alert_id) to ${ALERT_LOG}\n" >> ${LOG} printf "\n$(date),$alert_id,Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold.\n" >> ${ALERT_LOG} fi - done done