From caa14e0cade92be5c481d65688178da37584af88 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 22 Jun 2021 10:14:33 -0400 Subject: [PATCH 1/3] Fix Retry Spam --- salt/common/tools/sbin/soup | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 1a8b7cef5..c1e25b208 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -884,7 +884,8 @@ main() { # Testing that salt-master is up by checking that is it connected to itself set +e - retry 50 10 "salt-call state.show_top -l error" || fail "salt-master could not be reached. Check $SOUP_LOG for details." + echo "Waiting on the Salt Master service to be ready." + salt-call state.show_top -l error queue=True || fail "salt-master could not be reached. Check $SOUP_LOG for details." set -e echo "" @@ -920,9 +921,9 @@ main() { echo "Starting Salt Master service." systemctl start salt-master - # Testing that salt-master is up by checking that is it connected to itself set +e - retry 50 10 "salt-call state.show_top -l error" || fail "salt-master could not be reached. Check $SOUP_LOG for details." + echo "Waiting on the Salt Master service to be ready." + salt-call state.show_top -l error queue=True || fail "salt-master could not be reached. Check $SOUP_LOG for details." set -e echo "Running a highstate. This could take several minutes." @@ -996,4 +997,4 @@ EOF read -r input main "$@" | tee -a $SOUP_LOG - \ No newline at end of file + From c5b81f2f4b57a67f577f632ea961251dd72b85b3 Mon Sep 17 00:00:00 2001 From: weslambert Date: Wed, 23 Jun 2021 09:17:37 -0400 Subject: [PATCH 2/3] Fix output so that it can be redirected to local file with appropriate syntax --- salt/common/tools/sbin/so-elasticsearch-pipeline-view | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-elasticsearch-pipeline-view b/salt/common/tools/sbin/so-elasticsearch-pipeline-view index 9f799c07f..3239aec0a 100755 --- a/salt/common/tools/sbin/so-elasticsearch-pipeline-view +++ b/salt/common/tools/sbin/so-elasticsearch-pipeline-view @@ -21,5 +21,5 @@ if [ "$1" == "" ]; then {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/* | jq . else - {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/$1 | jq . + {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/$1 | jq .[] fi From 243e888717a9a8bd5746e0f8e2196055c74b0e89 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 23 Jun 2021 14:41:34 -0400 Subject: [PATCH 3/3] Add queue=True -- needed for all salt commands, not just state changes --- salt/common/tools/sbin/so-elastic-auth | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-elastic-auth b/salt/common/tools/sbin/so-elastic-auth index 715f55fe4..6157cb4b4 100755 --- a/salt/common/tools/sbin/so-elastic-auth +++ b/salt/common/tools/sbin/so-elastic-auth @@ -32,7 +32,7 @@ fi function restart() { if [[ -z "$ELASTIC_AUTH_SKIP_HIGHSTATE" ]]; then echo "Elasticsearch on all affected minions will now be stopped and then restarted..." - salt -C 'G@role:so-standalone or G@role:so-eval or G@role:so-import or G@role:so-manager or G@role:so-managersearch or G@role:so-node or G@role:so-heavynode' cmd.run so-elastic-stop + salt -C 'G@role:so-standalone or G@role:so-eval or G@role:so-import or G@role:so-manager or G@role:so-managersearch or G@role:so-node or G@role:so-heavynode' cmd.run so-elastic-stop queue=True echo "Applying highstate to all affected minions..." salt -C 'G@role:so-standalone or G@role:so-eval or G@role:so-import or G@role:so-manager or G@role:so-managersearch or G@role:so-node or G@role:so-heavynode' state.highstate queue=True fi