Commit b905259e authored by Vincent Pelletier's avatar Vincent Pelletier

erp5-cluster: Assign cluster-unique names to zope processes.

Also, do not tolerate missing instance-count internal zope partition
parameter.
parent 44087b3a
......@@ -203,7 +203,7 @@ md5sum = 6d52007d9bdc25ed0c83a49d63d59a18
[template-zope-conf]
< = download-base
filename = zope.conf.in
md5sum = 43b27a5e9c641ab780a083223c693d04
md5sum = 8fe36c41ab784f547b968dc6edd0ca29
[template-my-cnf]
< = download-base
......@@ -295,7 +295,7 @@ extra-context =
[template-erp5]
< = download-base
filename = instance-erp5.cfg.in
md5sum = 66c338cd82c89a3217f4576429661a51
md5sum = 28881f40de940b1f4070f1a7ffdd1d27
[template-neo]
< = download-base
......@@ -310,7 +310,7 @@ md5sum = 7bbb690cb2ea38cd2aa84c8a79c50399
[template-zope]
< = download-base
filename = instance-zope.cfg.in
md5sum = 19e0e41fa4b2674a67f2cfb2562524c8
md5sum = 6a566960a2617a59fe0c8c77622dbac9
link-binary =
${aspell:location}/bin/aspell
${coreutils:location}/bin/basename
......
......@@ -82,6 +82,7 @@ extra-config =
memcached-url
mysql-test-url-list
mysql-url-list
name
port-base
site-id
smtp-url
......@@ -121,6 +122,7 @@ software-type = zope
[{{ name }}]
< = request-zope-base
name = {{ base_name }}
config-name = {{ dumps(custom_name) }}
config-instance-count = {{ dumps(zope_parameter_dict.get('instance-count', 1)) }}
config-thread-amount = {{ dumps(zope_parameter_dict.get('thread-amount', 1)) }}
config-timerserver-interval = {{ dumps(zope_parameter_dict.get('timerserver-interval', 5)) }}
......
......@@ -3,6 +3,7 @@
{% set next_port = slapparameter_dict['port-base'] -%}
{% set site_id = slapparameter_dict['site-id'] -%}
{% set storage_type = slapparameter_dict['zodb-storage-type'] -%}
{% set node_id_base = slapparameter_dict['name'] -%}
{% set part_list = [] -%}
{% set publish_list = [] -%}
{% set zodb_dict = slapparameter_dict['zodb-dict'] -%}
......@@ -212,11 +213,12 @@ logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
{% macro zope(
name,
index,
port,
longrequest_logger_timeout,
longrequest_logger_interval
) -%}
{% set name = 'zope-' ~ index -%}
{% set conf_name = name ~ '-conf' -%}
{% set conf_parameter_name = conf_name ~ '-param' -%}
{% set zope_tunnel_section_name = name ~ '-ipv6toipv4' -%}
......@@ -228,6 +230,7 @@ lock-file = ${directory:run}/{{ name }}.lock
port = {{ port }}
event-log = ${directory:log}/{{ name }}-event.log
z2-log = ${directory:log}/{{ name }}-Z2.log
node-id = {{ dumps(node_id_base ~ '-' ~ index) }}
[{{ conf_name }}]
< = zope-conf-base
......@@ -279,8 +282,13 @@ log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_
post = {{ bin_directory }}/killpidfromfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} SIGUSR2
{% endmacro -%}
{% for i in range(slapparameter_dict.get('instance-count', 1)) -%}
{{ zope("zope-" ~ i, next_port, slapparameter_dict['longrequest-logger-timeout'], slapparameter_dict['longrequest-logger-interval']) }}
{% for i in range(slapparameter_dict['instance-count']) -%}
{{ zope(
i,
next_port,
slapparameter_dict['longrequest-logger-timeout'],
slapparameter_dict['longrequest-logger-interval'],
) }}
{% set next_port = next_port + 1 -%}
{% endfor -%}
......
......@@ -50,6 +50,10 @@ products {{ parameter_dict['instance-products'] }}
</product-config>
{% endif -%}
<product-config CMFActivity>
node-id {{ parameter_dict['node-id'] }}
</product-config>
{% set timerserver_interval = parameter_dict['timerserver-interval'] -%}
{% if timerserver_interval -%}
%import timerserver
......
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