From a3b8fd4999221ae3fa8d00f700a6b21a2191e282 Mon Sep 17 00:00:00 2001 From: Florian Wolpert Date: Fri, 24 Nov 2017 18:00:18 +0100 Subject: [PATCH] change order of some rules to avoid warnings place tcp-request, http-request and http-response rules in front of reqxxx and rspxxx rules to avoid warnings like: [WARNING] 327/172846 (4677) : parsing [/etc/haproxy/haproxy.cfg:110] : a 'http-request' rule placed after a 'reqadd' rule will still be processed before. --- templates/frontend.cfg | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/templates/frontend.cfg b/templates/frontend.cfg index d4dd55a..06f18d1 100644 --- a/templates/frontend.cfg +++ b/templates/frontend.cfg @@ -47,6 +47,20 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if {% endfor %} {% endif -%} + {%- if item.tcp_request is defined -%} + {%- for request in item.tcp_request -%} + tcp-request {{ request.param }} {{ request.value }}{% if request.condition is defined %} {{ request.condition }}{% endif %} + {% endfor -%} + {% endif -%} + + {%- if item.http_request is defined -%} + {{ macros.http_request(item.http_request) }} + {%- endif -%} + + {%- if item.http_response is defined -%} + {{ macros.http_response(item.http_response) }} + {%- endif -%} + {%- if item.reqadd is defined -%} {%- for reqadd in item.reqadd -%} reqadd {{ reqadd }} @@ -105,20 +119,6 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if {% endfor -%} {% endif -%} - {%- if item.tcp_request is defined -%} - {%- for request in item.tcp_request -%} - tcp-request {{ request.param }} {{ request.value }}{% if request.condition is defined %} {{ request.condition }}{% endif %} - {% endfor -%} - {% endif -%} - - {%- if item.http_request is defined -%} - {{ macros.http_request(item.http_request) }} - {%- endif -%} - - {%- if item.http_response is defined -%} - {{ macros.http_response(item.http_response) }} - {%- endif -%} - {%- if item.default_backend is defined -%} default_backend {{ item.default_backend }} {% endif -%}