Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
open-source
docker-pxc
Commits
114e6476
Commit
114e6476
authored
Feb 26, 2018
by
Fabio Montefuscolo
Browse files
little debug messages
parent
67b942b5
Pipeline
#3140
passed with stage
in 23 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
entrypoint/bootstrap.sh
entrypoint/bootstrap.sh
+6
-5
entrypoint/main.sh
entrypoint/main.sh
+1
-0
No files found.
entrypoint/bootstrap.sh
View file @
114e6476
...
...
@@ -42,23 +42,24 @@ bootstrap_database () {
sql_file
=
"
${
PXC_HOME
}
/bootstrap.sql"
bootstrap_sql_timezone
>>
"
$sql_file
"
bootstrap_sql_root_user
>>
"
$sql_file
"
bootstrap_sql_root_user
|
tee
-a
"
$sql_file
"
if
[
-n
"
$MYSQL_DATABASE
"
]
;
then
bootstrap_sql_database
>>
"
$sql_file
"
bootstrap_sql_database
|
tee
-a
"
$sql_file
"
fi
if
[
-n
"
$MYSQL_USER
"
]
&&
[
-n
"
$MYSQL_PASSWORD
"
]
;
then
bootstrap_sql_user
>>
$sql_file
bootstrap_sql_user
|
tee
-a
$sql_file
if
[
-n
"
$MYSQL_DATABASE
"
]
;
then
bootstrap_sql_grant_user
>>
"
$sql_file
"
bootstrap_sql_grant_user
|
tee
-a
"
$sql_file
"
fi
fi
echo
"## Creating new data directory at '
${
PXC_DATA
}
'"
mysql_install_db
\
--insecure
\
--user
=
mysql
\
...
...
@@ -66,5 +67,5 @@ bootstrap_database () {
--datadir
=
"
${
PXC_DATA
}
"
\
--extra-sql-file
=
"
$sql_file
"
rm
"
$sql_file
"
#
rm "$sql_file"
}
entrypoint/main.sh
View file @
114e6476
...
...
@@ -82,6 +82,7 @@ then
while
[
"
$tries
"
-gt
"0"
]
&&
!
echo
1
>
/dev/tcp/
$leader
/3306
;
do
tries
=
$((
$tries
-
1
))
echo
"Waiting for the leader
$leader
, I will try more
$tries
times"
sleep
5
done
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment