-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from smithfarm/wip-278
provision.sh: refactor PROVISIONED_NODES while loop
- Loading branch information
Showing
9 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# make sure all minions are responding | ||
set +ex | ||
LOOP_COUNT="0" | ||
while true ; do | ||
if [ "$LOOP_COUNT" -ge "30" ] ; then | ||
echo "ERROR: minion(s) not responding to ping?" | ||
exit 1 | ||
fi | ||
LOOP_COUNT="$((LOOP_COUNT + 1))" | ||
echo "Pinging {{ nodes | length }} minions..." | ||
MINIONS_RESPONDING="$(salt '*' test.ping 2> /dev/null | grep True | wc --lines)" | ||
echo "${MINIONS_RESPONDING} of {{ nodes | length }} minions responded to ping." | ||
[ "$MINIONS_RESPONDING" = "{{ nodes|length }}" ] && break | ||
set -x | ||
sleep 3 | ||
set +x | ||
done | ||
set -ex |