Fix galera_force_bootstrap behaviour
Currently, ``galera_force_bootstrap`` fuctionality is eqivalent to ``galera_ignore_cluster_state`` and not really functional. We add extra conditions to cluster bootstrap handlers that allow to force bootstrap cluster when it's already running. This could also be leveraged while stretching galera cluster. Depends-On: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/821415 Change-Id: I0380782a034d291fd2173c2ae59fdfb8f4468bf0 (cherry picked from commit 47d708e1612cfae7a4d0fe6dbef71f58a165d166)
This commit is contained in:
parent
76bdc36242
commit
3f00bfaefb
@ -59,7 +59,7 @@
|
||||
listen: Bootstrap cluster
|
||||
when:
|
||||
- galera_install_server | bool
|
||||
- not galera_cluster_ready | bool
|
||||
- not galera_cluster_ready | bool or galera_force_bootstrap | bool
|
||||
|
||||
- name: Start new cluster
|
||||
command: /usr/local/bin/galera_new_cluster
|
||||
@ -70,13 +70,13 @@
|
||||
run_once: true
|
||||
when:
|
||||
- galera_install_server | bool
|
||||
- not galera_cluster_ready | bool
|
||||
- not galera_cluster_ready | bool or galera_force_bootstrap | bool
|
||||
listen: Bootstrap cluster
|
||||
|
||||
- name: Restart mysql (All)
|
||||
service:
|
||||
name: "{{ galera_mariadb_service_name }}"
|
||||
state: "{{ (not hostvars[item]['galera_cluster_ready'] | bool) | ternary('started', 'restarted') }}"
|
||||
state: "{{ (not hostvars[item]['galera_cluster_ready'] | bool or galera_force_bootstrap | bool) | ternary('started', 'restarted') }}"
|
||||
enabled: yes
|
||||
environment:
|
||||
MYSQLD_STARTUP_TIMEOUT: 180
|
||||
|
Loading…
x
Reference in New Issue
Block a user