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

#!/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

- service: galera_bootstrap_stop_service - service: galera_bootstrap_stop_service


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


file.touch: file.touch:
- name: /root/.galera_bootstrap - name: /root/.galera_bootstrap
- require: - require:
- service: galera_bootstrap_start_service_final
- cmd: galera_bootstrap_start_service_final
- watch_in: - watch_in:
- file: galera_config - file: galera_config



Loading…
Cancel
Save