From 6d00236edb5339e9877500cef9dc7169a17163b3 Mon Sep 17 00:00:00 2001 From: Jason Anderson Date: Mon, 13 Apr 2020 16:01:25 -0500 Subject: [PATCH] [haproxy-config] Fix missing servers in split cfg When using the split config style, all backends would be empty, which meant that HAProxy was unable to serve any traffic. This turned out to be due to a bad default in the split config template. Closes-Bug: #1872545 Change-Id: I952e526e735e1d31445963f04d41d66bbdbfdee4 --- .../templates/haproxy_single_service_split.cfg.j2 | 2 +- releasenotes/notes/bug-1872545-52f00bd340a800c2.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1872545-52f00bd340a800c2.yaml diff --git a/ansible/roles/haproxy-config/templates/haproxy_single_service_split.cfg.j2 b/ansible/roles/haproxy-config/templates/haproxy_single_service_split.cfg.j2 index ec269a307a..6cb40fa2ec 100644 --- a/ansible/roles/haproxy-config/templates/haproxy_single_service_split.cfg.j2 +++ b/ansible/roles/haproxy-config/templates/haproxy_single_service_split.cfg.j2 @@ -108,7 +108,7 @@ backend {{ service_name }}_back {# services can be listening on a different port than haproxy #} {% set listen_port = haproxy_service.listen_port|default(haproxy_service.port) %} {# Custom member list can use jinja to generate a semicolon separated list #} - {% set custom_member_list = haproxy_service.custom_member_list|default() %} + {% set custom_member_list = haproxy_service.custom_member_list|default(none) %} {# Mode defaults to http #} {% set mode = haproxy_service.mode|default('http') %} {# Use the parent host group but allow it to be overridden #} diff --git a/releasenotes/notes/bug-1872545-52f00bd340a800c2.yaml b/releasenotes/notes/bug-1872545-52f00bd340a800c2.yaml new file mode 100644 index 0000000000..cb8f085e0e --- /dev/null +++ b/releasenotes/notes/bug-1872545-52f00bd340a800c2.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes issue where HAProxy would have no backend servers in its config files + when using the "split" config template style.