diff options
Diffstat (limited to 'docker/galera/start.sh')
| -rwxr-xr-x | docker/galera/start.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/galera/start.sh b/docker/galera/start.sh new file mode 100755 index 000000000..f8f8d7f77 --- /dev/null +++ b/docker/galera/start.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/mysqld_safe" +ARGS="" + +# loading common functions +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# loading functions +source /opt/kolla/config/config-galera.sh + +# This catches all cases of the BOOTSTRAP variable being set, including empty +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]] && [[ ! -e /var/lib/mysql/cluster.exists ]]; then + ARGS="--wsrep-new-cluster" + touch /var/lib/mysql/cluster.exists + populate_db + bootstrap_db +fi + +exec $CMD $ARGS |
