Fixed MySQL SSL options parsing for MySQL 8.0 client

This commit is contained in:
Alexey Pustovalov
2020-08-25 07:36:59 -04:00
parent d8dc57b539
commit 62555ae78b
18 changed files with 66 additions and 34 deletions

View File

@ -63,7 +63,7 @@ RUN set -eux && \
dnf --quiet makecache && \
dnf -y install --setopt=install_weak_deps=False --best --setopt=tsflags=nodocs \
glibc-locale-source && \
dnf -y install --setopt=tsflags=nodocs \
dnf -y install --setopt=install_weak_deps=False --best --setopt=tsflags=nodocs \
gettext \
git && \
cd /usr/share/ && \

View File

@ -171,8 +171,12 @@ check_db_connect() {
WAIT_TIMEOUT=5
if [ "${ZBX_DB_ENCRYPTION}" == "true" ]; then
ssl_opts="--ssl-mode=required --ssl-ca=${ZBX_DB_CA_FILE} --ssl-key=${ZBX_DB_KEY_FILE} --ssl-cert=${ZBX_DB_CERT_FILE}"
fi
while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \
--password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10)" ]; do
--password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
done