Commit 5b20133e authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: enable server-sync for ZEO

For ZEO4, this was implemented as a monkey patch in ERP5, but this is
now supported in ZEO5, but not enabled by default.

The setting is only avaiable through ZEO's own ZConfig, but not with
ZODB's <zeoclient> so we also adjust the config to import ZEO and use
ZEO's <clientstorage>.
parent 3eb670f6
......@@ -34,7 +34,7 @@ md5sum = cfe4696a67bf4886a5d8252a5274a941
[template-zope-conf]
filename = zope.conf.in
md5sum = 153fe68aa92452c3e2076d2ed26ff524
md5sum = b524c9ef4d7deadfd4bd84f2e880f9ed
[site-zcml]
filename = site.zcml
......@@ -78,7 +78,7 @@ md5sum = f5a1661449c9681b3de7d4af645124ba
[template-zeo]
filename = instance-zeo.cfg.in
md5sum = 3c59315a8f102a970dc54ded85df735a
md5sum = 84a77b40c5562a59a60d2146894890cf
[template-zodb-base]
filename = instance-zodb-base.cfg.in
......
......@@ -28,7 +28,7 @@ ip = {{ ipv4 }}
{% set current_port = next(ports) -%}
{% set known_tid_storage_identifier_host = (ipv4, current_port), -%}
{% for name, zodb in zodb -%}
{% do storage_dict.__setitem__(name, {'server': ipv4 ~ ':' ~ current_port, 'storage': name}) %}
{% do storage_dict.__setitem__(name, {'server': ipv4 ~ ':' ~ current_port, 'storage': name, 'server-sync': 'true'}) %}
{% set path = zodb.get('path', '%(zodb)s/%(name)s.fs') % {'zodb': default_zodb_path, 'name': name} -%}
{% do storage_list.append((name, path)) -%}
{% set backup_directory = zodb.get('backup', '%(backup)s/%(name)s') % {'backup': default_backup_path, 'name': name} -%}
......
......@@ -129,9 +129,12 @@ trusted-proxy 0.0.0.0
{% for m in parameter_dict['import-list'] -%}
%import {{ m }}
{% endfor -%}
{% set type_dict = {'neo': 'NEOStorage', 'zeo': 'zeoclient'} %}
{% set type_dict = {'neo': 'NEOStorage', 'zeo': 'clientstorage'} %}
{% for name, zodb_dict in six.iteritems(parameter_dict['zodb-dict']) %}
<zodb_db {{ name }}>
{% if zodb_dict['type'] == 'zeo' %}
%import ZEO
{% endif %}
{%- set storage_type = type_dict[zodb_dict.pop('type')] %}
{%- set storage_dict = zodb_dict.pop('storage-dict') %}
{%- do root_common.apply_overrides(zodb_dict, node_id) %}
......
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