From 251c1261a94212737aac2171ef87ce8e2ce226d4 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Thu, 12 Jan 2023 21:22:51 +0100 Subject: [PATCH] net/haproxy: do not duplicate global defaults anymore, closes #2642 --- net/haproxy/pkg-descr | 1 + .../service/templates/OPNsense/HAProxy/haproxy.conf | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/net/haproxy/pkg-descr b/net/haproxy/pkg-descr index 31a2faff2..4028a0650 100644 --- a/net/haproxy/pkg-descr +++ b/net/haproxy/pkg-descr @@ -17,6 +17,7 @@ Changed: * rename frontend option "Type" to "Connection Mode" (#3026) * migrate options "http-tunnel" and "forceclose" to "http-keep-alive" (#3026) * replace "process" with "threads" bind keyword for CPU Affinity (#3026) +* no longer duplicate global defaults in backends/frontends (#2642) Removed: * remove Processes/nbproc option (use Threads/nbthread instead) (#3026) diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index 441e12ce2..14442a686 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -1429,14 +1429,12 @@ frontend {{frontend.name}} {% if frontend.prometheus_enabled == '1' and frontend.mode == 'http' and frontend.prometheus_path|default("") != "" %} http-request use-service prometheus-exporter if { path {{frontend.prometheus_path}} } {% endif %} - # tuning options +{# # tuning options #} {% if frontend.tuning_maxConnections is defined %} maxconn {{frontend.tuning_maxConnections}} {% endif %} {% if frontend.tuning_timeoutClient is defined %} timeout client {{frontend.tuning_timeoutClient}} -{% elif OPNsense.HAProxy.general.defaults.timeoutClient is defined %} - timeout client {{OPNsense.HAProxy.general.defaults.timeoutClient}} {% endif %} {% if frontend.tuning_timeoutHttpReq|default("") != "" and frontend.mode == 'http' %} timeout http-request {{frontend.tuning_timeoutHttpReq}} @@ -1653,21 +1651,15 @@ backend {{backend.name}} {% endif %} {# # call macro to evaluate stickiness config #} {{ StickTableConfig(backend,true) }} - # tuning options +{# # tuning options #} {% if backend.tuning_timeoutConnect|default("") != "" %} timeout connect {{backend.tuning_timeoutConnect}} -{% elif OPNsense.HAProxy.general.defaults.timeoutConnect is defined %} - timeout connect {{OPNsense.HAProxy.general.defaults.timeoutConnect}} {% endif %} {% if backend.tuning_timeoutCheck|default("") != "" %} timeout check {{backend.tuning_timeoutCheck}} -{% elif OPNsense.HAProxy.general.defaults.timeoutCheck is defined %} - timeout check {{OPNsense.HAProxy.general.defaults.timeoutCheck}} {% endif %} {% if backend.tuning_timeoutServer|default("") != "" %} timeout server {{backend.tuning_timeoutServer}} -{% elif OPNsense.HAProxy.general.defaults.timeoutServer is defined %} - timeout server {{OPNsense.HAProxy.general.defaults.timeoutServer}} {% endif %} {% if backend.tuning_retries|default("") != "" %} retries {{backend.tuning_retries}}