Skip to content

Commit

Permalink
healthcheck correct connect result
Browse files Browse the repository at this point in the history
Based on user reports, a `connect` test can observer a non-"Can't
connect" error message.

Because this passes other tests, like innodb_initialized might
succeeded.

The final test -z "$connect_s" is also true, leaving the user
with an incorrect test result.

Maybe the healthcheck cnf hasn't been created yet?

Either way, ruggardise the final test to ensure a healthy connect
test occured.

Closes #610
  • Loading branch information
grooverdan committed Sep 2, 2024
1 parent 8b9a47d commit 2b6af7b
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions 10.11-ubi/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 10.11/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 10.5/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 10.6-ubi/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 10.6/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 11.1/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 11.2/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 11.4-ubi/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 11.4/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions 11.5/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions main-ubi/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down
4 changes: 2 additions & 2 deletions main/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ while [ $# -gt 0 ]; do
fi
shift
done
if [ -z "$connect_s" ]; then
# we didn't do a connnect test, so the current success status is suspicious
if [ "$connect_s" != "0" ]; then
# we didn't pass a connnect test, so the current success status is suspicious
# return what connect thinks.
connect
exit $?
Expand Down

0 comments on commit 2b6af7b

Please sign in to comment.