aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/pacemaker/haproxy.yaml
diff options
context:
space:
mode:
authorMathieu Bultel <mbultel@redhat.com>2017-08-28 17:24:47 +0200
committerMarius Cornea <mcornea@redhat.com>2017-09-14 12:27:57 +0000
commit2ada42c10949dfb668581d9690011a16383f23d5 (patch)
tree54266fae76a10af2d8469b0e3e89bdee73bc370c /docker/services/pacemaker/haproxy.yaml
parentbcbe6bbd02843e60045d2a168dc84f6e8c0ed496 (diff)
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)
Diffstat (limited to 'docker/services/pacemaker/haproxy.yaml')
-rw-r--r--docker/services/pacemaker/haproxy.yaml6
1 files changed, 6 insertions, 0 deletions
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