From cc58790ebefff19133b8114ad7d263409fe1ccc5 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 ff4e9c6ece0849d08f36dda93315181fe5a75339) --- handlers/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 27fd3525..c8ee364c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -24,7 +24,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: @@ -51,7 +51,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