Commit cf45667a authored by Vincent Pelletier's avatar Vincent Pelletier

Fix timerserver never being present in generated zope.conf .

Also, as backward compatibility is not needed at this level, implement what
is requested in BBB comment.
parent ec079121
......@@ -34,7 +34,7 @@ backward compatibility with existing automatically setup CAs.
{% macro zope(
name,
thread_amount=1,
timeserver=False,
timerserver_interval=0,
longrequest_logger_file='',
longrequest_logger_timeout='',
longrequest_logger_interval=''
......@@ -49,7 +49,9 @@ lock-file = ${directory:run}/{{ name }}.lock
{% set offset = zope_dummy_list | length -%}
port = {{ zope_port_base + offset }}
thread-amount = {{ thread_amount }}
timeserver = {{ timeserver }}
{% if timerserver_interval -%}
timerserver-interval = {{ timerserver_interval }}
{% endif -%}
event-log = ${directory:log}/{{ name }}-event.log
z2-log = ${directory:log}/{{ name }}-Z2.log
......@@ -354,12 +356,12 @@ context =
${:extra-context}
# Distribution node
{{ zope('zope-distribution', timeserver=True) }}
{{ zope('zope-distribution', timerserver_interval=1) }}
# Admin node
{{ zope('zope-admin') }}
# Activity nodes
{% for q in range(1, json['activity']['zopecount'] + 1) -%}
{{ zope('zope-activity-%s' % q, timeserver=True) }}
{{ zope('zope-activity-%s' % q, timerserver_interval=1) }}
{%- endfor %}
# Other zopes, apaches and haproxies
{% set publish_url_list = [] -%}
......
......@@ -132,7 +132,7 @@ extra-context =
[template-tidstorage]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-tidstorage.cfg.in
md5sum = 4e99979af04da930842d4ebd0d114a29
md5sum = c1f6873f758af9ee5661be986eeaf9eb
mode = 640
[template-cloudooo]
......@@ -147,7 +147,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal
[template-zope-conf]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/zope.conf.in
md5sum = 98852d8e717941a4c994d36d2c8961d0
md5sum = 0f223ba99a513b197f7cf8acf8c347cf
mode = 640
[template]
......
......@@ -48,12 +48,10 @@ products {{ product }}
</product-config>
{% endif -%}
{# BBB: should not have to compare those values to begin with: just take a
parameter with timerserver interval, empty string meaning disabled -#}
{% if parameter_dict['timeserver'] in ('y', 'yes', '1', 'true') -%}
{% if 'timerserver-interval' in parameter_dict -%}
%import timerserver
<timer-server>
interval 1
interval {{ parameter_dict['timerserver-interval'] }}
</timer-server>
{% endif -%}
......
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