Allow a single-node MariaDB cluster to restart properly

With the implementation of https://review.openstack.org/382683 a single
MariaDB node has no peers configured, so there's no need to bootstrap
the cluster on restart.

This patch removes the condition in the handler which previously was
needed to handle the re-bootstrap during a single node cluster service
restart.

Closes-Bug: #1595143
Closes-Bug: #1639900
Related-Bug: #1624327
Change-Id: I599bbf0efa4e3d5abdf6d95c95d7983c464b3ae5
(cherry picked from commit cc58790ebe)
This commit is contained in:
Jesse Pretorius 2016-11-08 18:51:39 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 528bb2271c
commit a9627447c0
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
state: restarted
sleep: 2
pattern: mysql
args: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) or (galera_cluster_members | length == 1) | ternary('--wsrep-new-cluster', '') }}"
args: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) | ternary('--wsrep-new-cluster', '') }}"
environment:
MYSQLD_STARTUP_TIMEOUT: 180
when: not galera_running_and_bootstrapped | bool
@ -45,7 +45,7 @@
state: restarted
sleep: 2
pattern: mysql
args: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) or (galera_cluster_members | length == 1) | ternary('--wsrep-new-cluster', '') }}"
args: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) | ternary('--wsrep-new-cluster', '') }}"
environment:
MYSQLD_STARTUP_TIMEOUT: 180
register: galera_restart_fall_back