fixes
diff --git a/galera/files/slave_bootstrap.sh b/galera/files/slave_bootstrap.sh
new file mode 100644
index 0000000..6c2e8e8
--- /dev/null
+++ b/galera/files/slave_bootstrap.sh
@@ -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
\ No newline at end of file
diff --git a/galera/slave.sls b/galera/slave.sls
index cc5857c..0a109f0 100644
--- a/galera/slave.sls
+++ b/galera/slave.sls
@@ -67,8 +67,9 @@
- 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 @@
file.touch:
- name: /root/.galera_bootstrap
- require:
- - service: galera_bootstrap_start_service_final
+ - cmd: galera_bootstrap_start_service_final
- watch_in:
- file: galera_config