From 90a7e440e23a31a6611d064f92061c093474bcdb Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 17 Sep 2024 17:26:03 +1000 Subject: [PATCH] healthcheck.sh add --no-connect option There is an implicit --connect option in healthcheck so that a normal use can be sure MariaDB is running on a tcp socket. There is a case in /docker-entrypoint-initdb.d where its desirable to perform healthchecks for components without a --connect. In this case, use --no-connect in the healthcheck to avoid an implicit --connect test. --- 10.11-ubi/healthcheck.sh | 5 +++++ 10.11/healthcheck.sh | 5 +++++ 10.5/healthcheck.sh | 5 +++++ 10.6-ubi/healthcheck.sh | 5 +++++ 10.6/healthcheck.sh | 5 +++++ 11.2/healthcheck.sh | 5 +++++ 11.4-ubi/healthcheck.sh | 5 +++++ 11.4/healthcheck.sh | 5 +++++ healthcheck.sh | 5 +++++ main-ubi/healthcheck.sh | 5 +++++ main/healthcheck.sh | 5 +++++ 11 files changed, 55 insertions(+) diff --git a/10.11-ubi/healthcheck.sh b/10.11-ubi/healthcheck.sh index c0fb93bb..07b4fe35 100755 --- a/10.11-ubi/healthcheck.sh +++ b/10.11-ubi/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/10.11/healthcheck.sh b/10.11/healthcheck.sh index c0fb93bb..07b4fe35 100755 --- a/10.11/healthcheck.sh +++ b/10.11/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/10.5/healthcheck.sh b/10.5/healthcheck.sh index d925ed58..8f91a55a 100755 --- a/10.5/healthcheck.sh +++ b/10.5/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/10.6-ubi/healthcheck.sh b/10.6-ubi/healthcheck.sh index c0fb93bb..07b4fe35 100755 --- a/10.6-ubi/healthcheck.sh +++ b/10.6-ubi/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/10.6/healthcheck.sh b/10.6/healthcheck.sh index c0fb93bb..07b4fe35 100755 --- a/10.6/healthcheck.sh +++ b/10.6/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/11.2/healthcheck.sh b/11.2/healthcheck.sh index 4cee59cb..dcc4db23 100755 --- a/11.2/healthcheck.sh +++ b/11.2/healthcheck.sh @@ -361,6 +361,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/11.4-ubi/healthcheck.sh b/11.4-ubi/healthcheck.sh index ad0b17f5..62be3459 100755 --- a/11.4-ubi/healthcheck.sh +++ b/11.4-ubi/healthcheck.sh @@ -363,6 +363,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/11.4/healthcheck.sh b/11.4/healthcheck.sh index ad0b17f5..62be3459 100755 --- a/11.4/healthcheck.sh +++ b/11.4/healthcheck.sh @@ -363,6 +363,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/healthcheck.sh b/healthcheck.sh index ad0b17f5..62be3459 100755 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -363,6 +363,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/main-ubi/healthcheck.sh b/main-ubi/healthcheck.sh index ad0b17f5..62be3459 100755 --- a/main-ubi/healthcheck.sh +++ b/main-ubi/healthcheck.sh @@ -363,6 +363,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;; diff --git a/main/healthcheck.sh b/main/healthcheck.sh index ad0b17f5..62be3459 100755 --- a/main/healthcheck.sh +++ b/main/healthcheck.sh @@ -363,6 +363,11 @@ while [ $# -gt 0 ]; do fi nodefaults= ;; + --no-connect) + # used for /docker-entrypoint-initdb.d scripts + # where you definately don't want a connection test + connect_s=0 + ;; --*) test=${1#--} ;;