Skip to content

Commit

Permalink
Allow a single-node MariaDB cluster to restart properly
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jesse Pretorius committed Nov 14, 2016
1 parent 714b846 commit ff4e9c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/main.yml
Expand Up @@ -24,7 +24,7 @@
state: restarted
sleep: 2
pattern: mysql
arguments: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) or (galera_cluster_members | length == 1) | ternary('--wsrep-new-cluster', '') }}"
arguments: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) | ternary('--wsrep-new-cluster', '') }}"
environment:
MYSQLD_STARTUP_TIMEOUT: 180
when:
Expand All @@ -51,7 +51,7 @@
state: restarted
sleep: 2
pattern: mysql
arguments: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) or (galera_cluster_members | length == 1) | ternary('--wsrep-new-cluster', '') }}"
arguments: "{{ (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
Expand Down

0 comments on commit ff4e9c6

Please sign in to comment.