From a9627447c0d5504d717b63f6677ba254fc86f421 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 8 Nov 2016 18:51:39 +0000 Subject: [PATCH] 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 cc58790ebefff19133b8114ad7d263409fe1ccc5) --- handlers/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index af0241a8..81a62c43 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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