Browse Source

fixes

tags/1.0
Ales Komarek 9 years ago
parent
commit
2ff5486f3c
2 changed files with 21 additions and 3 deletions
  1. +17
    -0
      galera/files/slave_bootstrap.sh
  2. +4
    -3
      galera/slave.sls

+ 17
- 0
galera/files/slave_bootstrap.sh View File

@@ -0,0 +1,17 @@
#!/bin/bash

service mysql start

counter=20

while [ $counter -gt 0 ]
do
service mysql status
if [[ $? -eq 0 ]]; then
exit 0
fi
counter=$(( $counter - 1 ))
sleep 2
done

exit 1

+ 4
- 3
galera/slave.sls View File

@@ -67,8 +67,9 @@ galera_bootstrap_init_config:
- service: galera_bootstrap_stop_service

galera_bootstrap_start_service_final:
service.running:
- name: {{ slave.service }}
cmd.script:
- name: slave_bootstrap
- source: salt://galera/files/slave_bootstrap.sh
- require:
- file: galera_bootstrap_init_config

@@ -76,7 +77,7 @@ galera_bootstrap_finish_flag:
file.touch:
- name: /root/.galera_bootstrap
- require:
- service: galera_bootstrap_start_service_final
- cmd: galera_bootstrap_start_service_final
- watch_in:
- file: galera_config


Loading…
Cancel
Save