From 2ada42c10949dfb668581d9690011a16383f23d5 Mon Sep 17 00:00:00 2001 From: Mathieu Bultel Date: Mon, 28 Aug 2017 17:24:47 +0200 Subject: Retry if the pacemaker_resource commands failed Add a retry when the pacemaker_resource command wasn't apply correctly, more info here: https://bugzilla.redhat.com/show_bug.cgi?id=1482116 This is the same approach puppet-pacemaker uses and provides eventual consistency when multiple nodes change the cluster CIB concurrently. This change depends-on : https://review.gerrithub.io/375982 The return code is not available in the current ansible-pacemaker package. Change-Id: I8da03f5c4a6d442617b81be5793a9724cc8842bf (cherry picked from commit e92430d8d03fc2ce2d0ce192b96209f2c5c04169) --- docker/services/pacemaker/haproxy.yaml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docker/services/pacemaker/haproxy.yaml') diff --git a/docker/services/pacemaker/haproxy.yaml b/docker/services/pacemaker/haproxy.yaml index 3cdc5255..29bd22af 100644 --- a/docker/services/pacemaker/haproxy.yaml +++ b/docker/services/pacemaker/haproxy.yaml @@ -230,6 +230,9 @@ outputs: resource: {get_attr: [HAProxyBase, role_data, service_name]} state: disable wait_for_resource: true + register: output + retries: 5 + until: output.rc == 0 when: is_bootstrap_node - name: Delete the stopped haproxy cluster resource. tags: step2 @@ -237,4 +240,7 @@ outputs: resource: {get_attr: [HAProxyBase, role_data, service_name]} state: delete wait_for_resource: true + register: output + retries: 5 + until: output.rc == 0 when: is_bootstrap_node -- cgit 1.2.3-korg