Commit 70b3e0e3 authored by Jérome Perrin's avatar Jérome Perrin

erp5: Fix bug with too many apache Listen

A regression in the apache entries for testrunner used one apache port
for each zope - not one for each family as what was intended.
There was also a problem that these apache ports were used even when no
testrunner.
parent 0f110d31
......@@ -90,7 +90,7 @@ md5sum = 3a6c7dec898abc7d1506957154ef566e
[template-balancer]
filename = instance-balancer.cfg.in
md5sum = a2f795e5ed9537951ee70114111930b0
md5sum = 3034ccaa76dbb94f4fe07150a4681843
[template-haproxy-cfg]
filename = haproxy.cfg.in
......
......@@ -55,13 +55,15 @@ mode = 644
{% endif -%}
{% set zope_effective_address = zope_address -%}
{% do zope_family_address_list.append((zope_effective_address, maxconn, webdav)) -%}
{% endfor -%}
{# # Generate entries with rewrite rule for test runnners #}
{# # Generate entries with rewrite rule for test runnners #}
{% set test_runner_address_list = slapparameter_dict.get(parameter_id ~ '-test-runner-address-list', []) %}
{% if test_runner_address_list -%}
{% set test_runner_backend_mapping = {} %}
{% set test_runner_apache_url_list = [] %}
{% set test_runner_external_port = next_port() %}
{% for i, (test_runner_internal_ip, test_runner_internal_port) in
enumerate(slapparameter_dict.get(parameter_id ~ '-test-runner-address-list', [])) %}
{% for i, (test_runner_internal_ip, test_runner_internal_port) in enumerate(test_runner_address_list) %}
{% do test_runner_backend_mapping.__setitem__(
'unit_test_' ~ i,
'http://' ~ test_runner_internal_ip ~ ':' ~ test_runner_internal_port ) %}
......@@ -72,8 +74,7 @@ mode = 644
(ipv4, test_runner_external_port),
( ssl_authentication, test_runner_backend_mapping ) ) -%}
{% do test_runner_url_dict.__setitem__(family_name, test_runner_apache_url_list) -%}
{% endfor -%}
{% endif -%}
{% endfor -%}
{# Make rendering fail artificially if any family has no known backend.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment