Quellcode durchsuchen

galera bootstrap improvements

Conflicts:
	galera/master.sls
	galera/slave.sls
tags/1.0
Jakub Pavlik vor 9 Jahren
Ursprung
Commit
4e4575f775
3 geänderte Dateien mit 23 neuen und 14 gelöschten Zeilen
  1. +1
    -1
      galera/files/bootstrap.sh
  2. +11
    -8
      galera/master.sls
  3. +11
    -5
      galera/slave.sls

galera/files/slave_bootstrap.sh → galera/files/bootstrap.sh Datei anzeigen

@@ -3,7 +3,7 @@

service {{ slave.service }} start

counter=40
counter=70

while [ $counter -gt 0 ]
do

+ 11
- 8
galera/master.sls Datei anzeigen

@@ -56,7 +56,7 @@ galera_init_script:
- require:
- pkg: galera_packages

{%- if salt['cmd.run']('test -e /root/.galera_bootstrap; echo $?') != '0' %}
{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %}

galera_bootstrap_temp_config:
file.managed:
@@ -69,8 +69,10 @@ galera_bootstrap_temp_config:
- file: galera_init_script

galera_bootstrap_start_service:
service.running:
- name: {{ master.service }}
cmd.script:
- name: master_initial_bootstrap
- source: salt://galera/files/bootstrap.sh
- template: jinja
- require:
- file: galera_bootstrap_temp_config

@@ -78,7 +80,7 @@ galera_bootstrap_set_root_password:
cmd.run:
- name: mysqladmin password "{{ master.admin.password }}"
- require:
- service: galera_bootstrap_start_service
- cmd: galera_bootstrap_start_service

mysql_bootstrap_update_maint_password:
cmd.run:
@@ -102,16 +104,17 @@ galera_bootstrap_init_config:
- service: galera_bootstrap_stop_service

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

galera_bootstrap_finish_flag:
file.touch:
- name: /root/.galera_bootstrap
- name: /var/lib/mysql/.galera_bootstrap
- require:
- service: galera_bootstrap_start_service_final
- cmd: galera_bootstrap_start_service_final
- watch_in:
- file: galera_config


+ 11
- 5
galera/slave.sls Datei anzeigen

@@ -56,7 +56,7 @@ galera_init_script:
- require:
- pkg: galera_packages

{%- if salt['cmd.run']('test -e /root/.galera_bootstrap; echo $?') != '0' %}
{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %}

galera_bootstrap_temp_config:
file.managed:
@@ -69,8 +69,10 @@ galera_bootstrap_temp_config:
- file: galera_init_script

galera_bootstrap_start_service:
service.running:
- name: {{ slave.service }}
cmd.script:
- name: slave_initial_bootstrap
- source: salt://galera/files/bootstrap.sh
- template: jinja
- require:
- file: galera_bootstrap_temp_config

@@ -78,7 +80,7 @@ galera_bootstrap_set_root_password:
cmd.run:
- name: mysqladmin password "{{ slave.admin.password }}"
- require:
- service: galera_bootstrap_start_service
- cmd: galera_bootstrap_start_service

mysql_bootstrap_update_maint_password:
cmd.run:
@@ -104,14 +106,18 @@ galera_bootstrap_init_config:
galera_bootstrap_start_service_final:
cmd.script:
- name: slave_bootstrap
<<<<<<< HEAD
- source: salt://galera/files/slave_bootstrap.sh
- template: jinja
=======
- source: salt://galera/files/bootstrap.sh
>>>>>>> 5f0d683... galera bootstrap improvements
- require:
- file: galera_bootstrap_init_config

galera_bootstrap_finish_flag:
file.touch:
- name: /root/.galera_bootstrap
- name: /var/lib/mysql/.galera_bootstrap
- require:
- cmd: galera_bootstrap_start_service_final
- watch_in:

Laden…
Abbrechen
Speichern