Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/st2web-healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# check downstream services and mark container unhealthy if downstream is not unreachable
DOWNSTREAM_API_STATUS=$(curl --write-out "%{http_code}\n" --silent --output /dev/null $ST2_API_URL/v1)
if [ "${DOWNSTREAM_API_STATUS}" != "404" ]; then
if [ "${DOWNSTREAM_API_STATUS}" != "404" ] && [ "${DOWNSTREAM_API_STATUS}" != "401" ]; then
echo "st2api downstream failure"; exit 1;
fi
DOWNSTREAM_STREAM_STATUS=$(curl --write-out "%{http_code}\n" --silent --output /dev/null $ST2_STREAM_URL/v1/stream)
if [ "${DOWNSTREAM_STREAM_STATUS}" != "404" ]; then
if [ "${DOWNSTREAM_STREAM_STATUS}" != "404" ] && [ "${DOWNSTREAM_API_STATUS}" != "401" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not it be && [ "${DOWNSTREAM_STREAM_STATUS}" != "401" ] ? @wow0000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, I can see the status as healthy, kindly confirm.

echo "st2stream downstream failure"; exit 1;
fi
DOWNSTREAM_AUTH_STATUS=$(curl --write-out "%{http_code}\n" --silent --output /dev/null $ST2_AUTH_URL/v1)
Expand Down