Commit 114e6476 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo
Browse files

little debug messages

parent 67b942b5
Pipeline #3140 passed with stage
in 23 seconds
...@@ -42,23 +42,24 @@ bootstrap_database () { ...@@ -42,23 +42,24 @@ bootstrap_database () {
sql_file="${PXC_HOME}/bootstrap.sql" sql_file="${PXC_HOME}/bootstrap.sql"
bootstrap_sql_timezone >> "$sql_file" bootstrap_sql_timezone >> "$sql_file"
bootstrap_sql_root_user >> "$sql_file" bootstrap_sql_root_user | tee -a "$sql_file"
if [ -n "$MYSQL_DATABASE" ]; if [ -n "$MYSQL_DATABASE" ];
then then
bootstrap_sql_database >> "$sql_file" bootstrap_sql_database | tee -a "$sql_file"
fi fi
if [ -n "$MYSQL_USER" ] && [ -n "$MYSQL_PASSWORD" ]; if [ -n "$MYSQL_USER" ] && [ -n "$MYSQL_PASSWORD" ];
then then
bootstrap_sql_user >> $sql_file bootstrap_sql_user | tee -a $sql_file
if [ -n "$MYSQL_DATABASE" ]; if [ -n "$MYSQL_DATABASE" ];
then then
bootstrap_sql_grant_user >> "$sql_file" bootstrap_sql_grant_user | tee -a "$sql_file"
fi fi
fi fi
echo "## Creating new data directory at '${PXC_DATA}'"
mysql_install_db \ mysql_install_db \
--insecure \ --insecure \
--user=mysql \ --user=mysql \
...@@ -66,5 +67,5 @@ bootstrap_database () { ...@@ -66,5 +67,5 @@ bootstrap_database () {
--datadir="${PXC_DATA}" \ --datadir="${PXC_DATA}" \
--extra-sql-file="$sql_file" --extra-sql-file="$sql_file"
rm "$sql_file" # rm "$sql_file"
} }
...@@ -82,6 +82,7 @@ then ...@@ -82,6 +82,7 @@ then
while [ "$tries" -gt "0" ] && ! echo 1 > /dev/tcp/$leader/3306; while [ "$tries" -gt "0" ] && ! echo 1 > /dev/tcp/$leader/3306;
do do
tries=$(( $tries - 1 )) tries=$(( $tries - 1 ))
echo "Waiting for the leader $leader, I will try more $tries times"
sleep 5 sleep 5
done done
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment