Skip to content

Commit

Permalink
K8SPS-377: do not use --skip-ssl for db init (#723)
Browse files Browse the repository at this point in the history
* K8SPS-377: do not use --skip-ssl for db init on 8.4

https://perconadev.atlassian.net/browse/K8SPS-377

* remove --skip-ssl for all mysql versions

---------

Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
  • Loading branch information
pooknull and hors authored Aug 12, 2024
1 parent 3387435 commit fdc2138
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions build/ps-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
echo 'Initializing database'
# we initialize database into $TMPDIR because "--initialize-insecure" option does not work if directory is not empty
# in some cases storage driver creates unremovable artifacts (see K8SPXC-286), so $DATADIR cleanup is not possible
"$@" --initialize-insecure --skip-ssl --datadir="$TMPDIR"
"$@" --initialize-insecure --datadir="$TMPDIR"
mv "$TMPDIR"/* "$DATADIR/"
rm -rfv "$TMPDIR"
echo 'Database initialized'
Expand Down Expand Up @@ -427,14 +427,14 @@ fi

recovery_file='/var/lib/mysql/sleep-forever'
if [ -f "${recovery_file}" ]; then
set +o xtrace
echo "The $recovery_file file is detected, node is going to infinity loop"
echo "If you want to exit from infinity loop you need to remove $recovery_file file"
for (( ; ; )); do
if [ ! -f "${recovery_file}" ]; then
exit 0
fi
done
set +o xtrace
echo "The $recovery_file file is detected, node is going to infinity loop"
echo "If you want to exit from infinity loop you need to remove $recovery_file file"
for (( ; ; )); do
if [ ! -f "${recovery_file}" ]; then
exit 0
fi
done
fi

exec "$@"

0 comments on commit fdc2138

Please sign in to comment.