summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Rosser <jonathan.rosser@rd.bbc.co.uk>2018-12-13 21:49:55 +0000
committerJonathan Rosser <jonathan.rosser@rd.bbc.co.uk>2018-12-13 21:52:55 +0000
commite5104a345c1631682e7d3eb89a7f77225e7bf555 (patch)
tree301c58c000d4d02d78cf2e6506caf252fd55d8e3
parent4a22e7683be24598462a299b58082daad519df7e (diff)
Allow backend and backup node rise/fall parameters to be set
The template previously set the rise/fall count to the number of backend/backup nodes. This may not always be appropriate so this patch allows the rise/fall counts to be defined per service if required. The default behaviour remains unchanged if no rise/fall counts are provided. Change-Id: Ib413b622310b1f6f5146060089af7dffc0dd9236
Notes
Notes (review): Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Code-Review+2: Kevin Carter (cloudnull) <kevin@cloudnull.com> Workflow+1: Kevin Carter (cloudnull) <kevin@cloudnull.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 18 Dec 2018 11:03:54 +0000 Reviewed-on: https://review.openstack.org/625124 Project: openstack/openstack-ansible-haproxy_server Branch: refs/heads/master
-rw-r--r--templates/service.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/service.j2 b/templates/service.j2
index b33305e..3524adc 100644
--- a/templates/service.j2
+++ b/templates/service.j2
@@ -112,9 +112,9 @@ backend {{ item.service.haproxy_service_name }}-back
112{% set _ = entry.append("inter") %} 112{% set _ = entry.append("inter") %}
113{% set _ = entry.append(haproxy_interval | string) %} 113{% set _ = entry.append(haproxy_interval | string) %}
114{% set _ = entry.append("rise") %} 114{% set _ = entry.append("rise") %}
115{% set _ = entry.append(item.service.haproxy_backend_nodes | count | string) %} 115{% set _ = entry.append(item.service.backend_rise|default(item.service.haproxy_backend_nodes | count | string)) %}
116{% set _ = entry.append("fall") %} 116{% set _ = entry.append("fall") %}
117{% set _ = entry.append(item.service.haproxy_backend_nodes | count | string) %} 117{% set _ = entry.append(item.service.backend_fall|default(item.service.haproxy_backend_nodes | count | string)) %}
118{% if item.service.haproxy_backend_ssl | default(False) %} 118{% if item.service.haproxy_backend_ssl | default(False) %}
119{% set _ = entry.append("ssl") %} 119{% set _ = entry.append("ssl") %}
120{% if item.service.haproxy_backend_ca %} 120{% if item.service.haproxy_backend_ca %}
@@ -145,9 +145,9 @@ backend {{ item.service.haproxy_service_name }}-back
145{% set _ = entry.append("inter") %} 145{% set _ = entry.append("inter") %}
146{% set _ = entry.append(haproxy_interval | string) %} 146{% set _ = entry.append(haproxy_interval | string) %}
147{% set _ = entry.append("rise") %} 147{% set _ = entry.append("rise") %}
148{% set _ = entry.append(item.service.haproxy_backup_nodes | count | string) %} 148{% set _ = entry.append(item.service.backup_rise|default(item.service.haproxy_backup_nodes | count | string)) %}
149{% set _ = entry.append("fall") %} 149{% set _ = entry.append("fall") %}
150{% set _ = entry.append(item.service.haproxy_backup_nodes | count | string) %} 150{% set _ = entry.append(item.service.backup_fall|default(item.service.haproxy_backup_nodes | count | string)) %}
151{% set _ = entry.append("backup") %} 151{% set _ = entry.append("backup") %}
152{% if item.service.haproxy_backend_ssl | default(False) %} 152{% if item.service.haproxy_backend_ssl | default(False) %}
153{% set _ = entry.append("ssl") %} 153{% set _ = entry.append("ssl") %}