diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 8d3c14992bd1099fda7331cf2e7957191377f2ad..4dc7b6708b973535501a53f776b21e0bc583c933 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -279,7 +279,7 @@ md5sum = 7735d535aa34dfdc18a776b80bc0ca3d [template-zeo] < = download-base filename = instance-zeo.cfg.in -md5sum = ae4560ecbd748de5a1e0b10932d9be05 +md5sum = 6d6665595c08883c4f075dd3d176dc02 [template-zope] < = download-base diff --git a/stack/erp5/instance-zeo.cfg.in b/stack/erp5/instance-zeo.cfg.in index b8c8d822591a3a1d9083a6cb9be1791532eeca4e..2f938726ea3bbb72c979898fdf9bea93e67d3c0d 100644 --- a/stack/erp5/instance-zeo.cfg.in +++ b/stack/erp5/instance-zeo.cfg.in @@ -56,10 +56,9 @@ ipv6 = {{ ipv6 }} {% endfor -%} {% for storage_family, export_list in storage_dict.items() -%} {% set known_tid_storage_identifier_host = ((ipv4, next_port), ) -%} -{% set client_dict = {} -%} {% for export_id, mount_point, cache_size, export_storage_dict in export_list -%} {% do export_storage_dict.__setitem__('path', export_storage_dict.get('path', '%(zodb)s/%(name)s.fs') % {'zodb': default_zodb_path, 'name': export_id}) -%} -{% do client_dict.update(export_storage_dict.get('client', {})) -%} +{% set client_dict = export_storage_dict.get('client', {}).copy() -%} {% do client_dict.__setitem__('storage', export_id) -%} {# XXX: I would like to raise if export_id is present in zodb_dict -#} {% do zodb_dict.__setitem__(export_id, [ @@ -101,7 +100,7 @@ port = {{ next_port }} path = ${directory:promises}/zeo-{{ storage_family }} {% if use_ipv6 -%} -{% do client_dict.__setitem__('server', '[' ~ ipv6 ~ ']:' ~ next_port) -%} +{% set address = '[' ~ ipv6 ~ ']:' ~ next_port -%} {% set tunnel_section_name = zeo_section_name ~ "-tunnel" -%} [{{ tunnel_section_name }}] < = ipv6toipv4-base @@ -115,8 +114,11 @@ hostname = {{ "${" ~ tunnel_section_name ~ ":ipv6}" }} port = {{ next_port }} path = ${directory:promises}/zeo-tunnel-{{ storage_family }} {% else -%} -{% do client_dict.__setitem__('server', ipv4 ~ ':' ~ next_port) -%} +{% set address = ipv4 ~ ':' ~ next_port -%} {% endif -%} +{% for export in export_list -%} +{% do zodb_dict[export[0]][2].__setitem__('server', address) -%} +{% endfor -%} {% set next_port = next_port + 1 -%} {% endfor -%}