Skip to content

Commit

Permalink
Skip ssl on docker_temp_server_start
Browse files Browse the repository at this point in the history
And checking it when seeing if the server is started.

Closes: #592
  • Loading branch information
grooverdan committed Jun 11, 2024
1 parent 43ea329 commit 76b7b9e
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 26 deletions.
6 changes: 4 additions & 2 deletions 10.11-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 10.11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 10.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 10.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 10.6-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 10.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 11.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
6 changes: 4 additions & 2 deletions 11.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +134,8 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
8 changes: 6 additions & 2 deletions 11.4-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +135,9 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
--skip-ssl --skip-ssl-verify-server-cert \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
8 changes: 6 additions & 2 deletions 11.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +135,9 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
--skip-ssl --skip-ssl-verify-server-cert \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
8 changes: 6 additions & 2 deletions 11.5-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +135,9 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
--skip-ssl --skip-ssl-verify-server-cert \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
8 changes: 6 additions & 2 deletions 11.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +135,9 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
--skip-ssl --skip-ssl-verify-server-cert \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
8 changes: 6 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ mysql_get_config() {
docker_temp_server_start() {
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
--expire-logs-days=0 \
--loose-innodb_buffer_pool_load_at_startup=0 &
--loose-innodb_buffer_pool_load_at_startup=0 \
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
&
declare -g MARIADB_PID
MARIADB_PID=$!
mysql_note "Waiting for server startup"
Expand All @@ -133,7 +135,9 @@ docker_temp_server_start() {
fi
local i
for i in {30..0}; do
if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then
if docker_process_sql "${extraArgs[@]}" --database=mysql \
--skip-ssl --skip-ssl-verify-server-cert \
<<<'SELECT 1' &> /dev/null; then
break
fi
sleep 1
Expand Down
5 changes: 5 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ update_version()
-e 's/REPLICATION REPLICA/REPLICATION SLAVE/' \
-e 's/START REPLICA/START SLAVE/' \
-e '/memory\.pressure/,+7d' \
-e '/--skip-ssl/d' \
"$version/docker-entrypoint.sh"
sed -i -e 's/ REPLICA\$/ SLAVE$/' "$dir"/healthcheck.sh
sed -i -e 's/\/run/\/var\/run\//g' "$dir/Dockerfile"
;; # almost nothing to see/do here
10.5)
sed -i -e '/--old-mode/d' \
-e '/--skip-ssl/d' \
-e '/memory\.pressure/,+7d' "$dir/docker-entrypoint.sh"
sed -i '/backwards compat/d' "$dir/Dockerfile"
;;
Expand Down Expand Up @@ -127,6 +129,9 @@ update_version()
else
sed -i -e '/memory\.pressure/,+7d' "$dir/docker-entrypoint.sh"
fi
if [[ $vmin = 10.* || $vmin =~ 11.[12] ]]; then
sed -i -e '/--skip-ssl/d' "$dir/docker-entrypoint.sh"
fi
if [[ $vmin =~ 11.[012345] ]]; then
sed -i -e 's/mysql_upgrade_info/mariadb_upgrade_info/' \
"$dir/docker-entrypoint.sh" "$dir/healthcheck.sh"
Expand Down

0 comments on commit 76b7b9e

Please sign in to comment.