Skip to content

Commit

Permalink
healthcheck config on socket/port - omit
Browse files Browse the repository at this point in the history
The socket/port that where used in the initialization of the datadir
in the /var/lib/mysql may not be the same used at runtime.

This was highlighted in MariaDB#630 where the ubi container puts a socket
in a different location from the non-ubi container.

On the assumption that any change of default port/socket is going
to be in a server configuration file, preferably with a [client-server]
section, lets omit copying this unnecessary.

This does however mean that command line specified changes to
socket (and port less so) will not be persistent. This means that
podman run mariadb:lts --socket=/tmp/s.sock will not be discoverable
for the healtcheck.sh script.
  • Loading branch information
grooverdan committed Feb 5, 2025
1 parent 9824707 commit 6e5a8c5
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 10.11-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 10.11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 10.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 10.6-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 10.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 11.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 11.4-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion 11.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion main-ubi/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down
2 changes: 1 addition & 1 deletion main/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ create_healthcheck_users() {
local maskPreserve
maskPreserve=$(umask -p)
umask 0077
echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
echo -e "[mariadb-client]\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf
$maskPreserve
}

Expand Down

0 comments on commit 6e5a8c5

Please sign in to comment.