-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving cwagent check outside of run celery (#2027)
* Moving cwagent check outside of run celery * making cwagent check executable * added shebang
- Loading branch information
Showing
7 changed files
with
21 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# Check and see if this is running in K8s and if so, wait for cloudwatch agent | ||
if [ -n "${STATSD_HOST}" ]; then | ||
echo "Initializing... Waiting for CWAgent to become ready within the next 30 seconds." | ||
timeout=30 | ||
while [ $timeout -gt 0 ]; do | ||
if nc -vz "$STATSD_HOST" 25888; then | ||
echo "CWAgent is Ready." | ||
break | ||
else | ||
echo "Waiting for CWAgent to become ready." | ||
sleep 1 | ||
timeout=$((timeout - 1)) | ||
fi | ||
done | ||
|
||
if [ $timeout -eq 0 ]; then | ||
echo "Timeout reached. CWAgent did not become ready in 30 seconds." | ||
exit 1 | ||
fi | ||
fi |
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