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