Commit 0e786af7 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Julien Muchembled

erp5: Make backend apache also listen on IPv6.

Also, fix frontend request.
parent ecabe3fd
......@@ -269,7 +269,7 @@ extra-context =
[template-erp5]
< = download-base
filename = instance-erp5.cfg.in
md5sum = 429f14ef4ef266fb077d0be1cb8b8887
md5sum = 58d5958e93c730a0e0058adcbbb1579c
[template-neo]
< = download-base
......@@ -311,7 +311,7 @@ link-binary =
[template-balancer]
< = download-base
filename = instance-balancer.cfg.in
md5sum = 16967b0dd693aaba611eb4eb6522a831
md5sum = 2e27ba1ab4fd24ec7df8b6f5d9835b44
[template-logrotate-base]
< = template-jinja2-base
......
......@@ -66,7 +66,7 @@ backend-dict = {{ dumps(haproxy_dict) }}
[apache]
recipe = slapos.cookbook:apache.zope.backend
backend-list = {{ dumps(apache_dict.values()) }}
ip = {% if use_ipv6 %}{{ ipv6 }}{% else %}{{ ipv4 }}{% endif %}
ip = {{ dumps([ipv6, ipv4]) }}
wrapper = ${directory:bin}/apache
scheme = https
key-file = ${directory:apache-conf}/apache.key
......@@ -88,11 +88,8 @@ ssl-authentication-crl = ${certificate-authority:ca-crl}
[publish]
recipe = slapos.cookbook:publish.serialised
{% for family_name, (apache_port, _) in apache_dict.items() -%}
{% if use_ipv6 -%}
{{ family_name }} = ${apache:scheme}://[${apache:ip}]:{{ apache_port }}
{% else -%}
{{ family_name }} = ${apache:scheme}://${apache:ip}:{{ apache_port }}
{% endif -%}
{{ family_name ~ '-v6' }} = ${apache:scheme}://[{{ ipv6 }}]:{{ apache_port }}
{{ family_name }} = ${apache:scheme}://{{ ipv4 }}:{{ apache_port }}
{% endfor -%}
[certificate-authority]
......
......@@ -127,7 +127,7 @@ sla-computer_guid = {{ zope_parameter_dict.get('computer-guid', computer_id) }}
[{{ frontend_name }}]
< = request-frontend-base
name = {{ frontend_name }}
config-url = {{ backend_url }}
config-url = ${request-balancer:{{ family_name }}-v6}
{% else -%}
{% set publishable = 'request-balancer:connection-' ~ family_name -%}
{% endif -%}
......@@ -150,7 +150,10 @@ extra-config =
zope-family-dict
{{ zope_address_list_id_dict.values() | join(' ') }}
return =
{{ zope_family_dict.keys() | join(' ') }}
{%- for family in zope_family_dict %}
{{ family }}
{{ family }}-v6
{% endfor -%}
config-zope-family-dict = {{ dumps(zope_family_parameter_dict) }}
config-tcpv4-port = {{ dumps(slapparameter_dict.get('', 2150)) }}
{% for zope_section_id, name in zope_address_list_id_dict.items() -%}
......
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