Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (16 sloc) 741 Bytes
# This script updates the status in etcd only after MariaDB is actually initialized and ready to accept connections
# Parameters
# Check if the cluster is marked as initialized. If it's already initialized, then just exit successfully
curl --silent --fail > /dev/null
if [ $? -ne 0 ]; then
sleep 10
while ! docker run --rm $IMAGE_NAME mysqladmin ping -h mariadb-node-0 --silent; do
sleep 5
# Wait 5 more seconds before sending the green light
sleep 5
# Server is ready: other nodes can now connect
curl -L -XPUT -d value="true"