From 2b6af7b61ab19c8364a8f2645586966413b3cfc5 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 2 Sep 2024 12:40:28 +1000 Subject: [PATCH] healthcheck correct connect result 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 --- 10.11-ubi/healthcheck.sh | 4 ++-- 10.11/healthcheck.sh | 4 ++-- 10.5/healthcheck.sh | 4 ++-- 10.6-ubi/healthcheck.sh | 4 ++-- 10.6/healthcheck.sh | 4 ++-- 11.1/healthcheck.sh | 4 ++-- 11.2/healthcheck.sh | 4 ++-- 11.4-ubi/healthcheck.sh | 4 ++-- 11.4/healthcheck.sh | 4 ++-- 11.5/healthcheck.sh | 4 ++-- healthcheck.sh | 4 ++-- main-ubi/healthcheck.sh | 4 ++-- main/healthcheck.sh | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/10.11-ubi/healthcheck.sh b/10.11-ubi/healthcheck.sh index 37227edd..eeecbcce 100755 --- a/10.11-ubi/healthcheck.sh +++ b/10.11-ubi/healthcheck.sh @@ -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 $? diff --git a/10.11/healthcheck.sh b/10.11/healthcheck.sh index 37227edd..eeecbcce 100755 --- a/10.11/healthcheck.sh +++ b/10.11/healthcheck.sh @@ -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 $? diff --git a/10.5/healthcheck.sh b/10.5/healthcheck.sh index 17528ce8..b110f973 100755 --- a/10.5/healthcheck.sh +++ b/10.5/healthcheck.sh @@ -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 $? diff --git a/10.6-ubi/healthcheck.sh b/10.6-ubi/healthcheck.sh index 37227edd..eeecbcce 100755 --- a/10.6-ubi/healthcheck.sh +++ b/10.6-ubi/healthcheck.sh @@ -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 $? diff --git a/10.6/healthcheck.sh b/10.6/healthcheck.sh index 37227edd..eeecbcce 100755 --- a/10.6/healthcheck.sh +++ b/10.6/healthcheck.sh @@ -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 $? diff --git a/11.1/healthcheck.sh b/11.1/healthcheck.sh index b8909c75..33794d8d 100755 --- a/11.1/healthcheck.sh +++ b/11.1/healthcheck.sh @@ -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 $? diff --git a/11.2/healthcheck.sh b/11.2/healthcheck.sh index b8909c75..33794d8d 100755 --- a/11.2/healthcheck.sh +++ b/11.2/healthcheck.sh @@ -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 $? diff --git a/11.4-ubi/healthcheck.sh b/11.4-ubi/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/11.4-ubi/healthcheck.sh +++ b/11.4-ubi/healthcheck.sh @@ -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 $? diff --git a/11.4/healthcheck.sh b/11.4/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/11.4/healthcheck.sh +++ b/11.4/healthcheck.sh @@ -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 $? diff --git a/11.5/healthcheck.sh b/11.5/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/11.5/healthcheck.sh +++ b/11.5/healthcheck.sh @@ -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 $? diff --git a/healthcheck.sh b/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -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 $? diff --git a/main-ubi/healthcheck.sh b/main-ubi/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/main-ubi/healthcheck.sh +++ b/main-ubi/healthcheck.sh @@ -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 $? diff --git a/main/healthcheck.sh b/main/healthcheck.sh index c5dcbd38..29294c36 100755 --- a/main/healthcheck.sh +++ b/main/healthcheck.sh @@ -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 $?