Merge "Update haproxy logging configuration"
This commit is contained in:
commit
9ccbe5b605
@ -14,7 +14,7 @@ defaults
|
||||
|
||||
|
||||
frontend octavia-frontend-api
|
||||
option tcplog
|
||||
option httplog
|
||||
bind 0.0.0.0:OCTAVIA_PORT
|
||||
mode http
|
||||
default_backend octavia-backend-api
|
||||
@ -26,4 +26,4 @@ backend octavia-backend-api
|
||||
# the devstack plugin will add entries here looking like:
|
||||
# server octavia-main <IP-main>:<PORT> weight 1
|
||||
# server octavia-second <IP-second>:<PORT> weight 1
|
||||
#
|
||||
#
|
||||
|
@ -112,7 +112,14 @@ bind {{ lb_vip_address }}:{{ listener.protocol_port }} {{
|
||||
|
||||
{% macro frontend_macro(constants, listener, lb_vip_address) %}
|
||||
frontend {{ listener.id }}
|
||||
{% if (listener.protocol.lower() ==
|
||||
constants.PROTOCOL_TERMINATED_HTTPS.lower() or
|
||||
listener.protocol.lower() ==
|
||||
constants.PROTOCOL_HTTP.lower()) %}
|
||||
option httplog
|
||||
{% else %}
|
||||
option tcplog
|
||||
{% endif %}
|
||||
{% if listener.connection_limit is defined %}
|
||||
maxconn {{ listener.connection_limit }}
|
||||
{% endif %}
|
||||
|
@ -31,7 +31,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" option tcplog\n"
|
||||
" option httplog\n"
|
||||
" maxconn 98\n"
|
||||
" redirect scheme https if !{ ssl_fc }\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -69,7 +69,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_tls_no_sni(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" option tcplog\n"
|
||||
" option httplog\n"
|
||||
" maxconn 98\n"
|
||||
" redirect scheme https if !{ ssl_fc }\n"
|
||||
" bind 10.0.0.2:443 "
|
||||
@ -274,7 +274,7 @@ class TestHaproxyCfg(base.TestCase):
|
||||
|
||||
def test_render_template_l7policies(self):
|
||||
fe = ("frontend sample_listener_id_1\n"
|
||||
" option tcplog\n"
|
||||
" option httplog\n"
|
||||
" maxconn 98\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
|
@ -635,7 +635,7 @@ def sample_l7rule_tuple(id,
|
||||
def sample_base_expected_config(frontend=None, backend=None, peers=None):
|
||||
if frontend is None:
|
||||
frontend = ("frontend sample_listener_id_1\n"
|
||||
" option tcplog\n"
|
||||
" option httplog\n"
|
||||
" maxconn 98\n"
|
||||
" bind 10.0.0.2:80\n"
|
||||
" mode http\n"
|
||||
|
Loading…
Reference in New Issue
Block a user