Commit 61b32c13 authored by Xavier Thompson's avatar Xavier Thompson

stack/erp5: Make zope aware of replication

Deactivate zope promises when the neo is expected to be BACKINGUP,
as this makes the zope process crash, which is currently expected.

Deactivating the zope process entirely in that case is not desired
because reactivating it would require updating instance parameters
and reprocessing the partition. Instead, ideally, the zope service
should adapt to the state of the neo.

Also, move zope service from etc/service to etc/run to make it not
be "on-watch", so that when the neo is BACKINGUP and zope crashes,
the partition does not bang and reprocess continuously. This seems
ok because the promise already asserts the service is running.
parent b414530a
......@@ -796,6 +796,11 @@
"title": "See `zope-longrequest-logger-error-threshold`",
"default": 0
},
"zope-expect-backingup-zodb": {
"type": "boolean",
"description": "Whether zope should expect the zodb to be a neo in BACKINGUP mode",
"default": false
},
"apachedex-promise-threshold": {
"type": "number",
"title": "Promise fails if the overall Apdex score for the previous day is below than this value. A value of 0 disables the promise.",
......
......@@ -74,7 +74,7 @@ md5sum = efdf08a9e67c0432fb77a6ce51301fd5
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = 455ba4b3ff26edb9bec07dcf7a570931
md5sum = 2a8ea5d49a389573a396e8c5efb8e625
[template-zeo]
filename = instance-zeo.cfg.in
......@@ -90,7 +90,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope]
filename = instance-zope.cfg.in
md5sum = 9c580be982d8c63ec06fc273ef3cb971
md5sum = 809d375ecedbf88b16b97547a14b36bf
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -243,6 +243,7 @@ config-hostalias-dict = {{ dumps(slapparameter_dict.get('hostalias-dict', {})) }
config-id-store-interval = {{ dumps(slapparameter_dict.get('id-store-interval')) }}
config-zope-longrequest-logger-error-threshold = {{ dumps(monitor_dict.get('zope-longrequest-logger-error-threshold', 20)) }}
config-zope-longrequest-logger-maximum-delay = {{ dumps(monitor_dict.get('zope-longrequest-logger-maximum-delay', 0)) }}
config-zope-expect-backingup-zodb = {{ dumps(monitor_dict.get('zope-expect-backingup-zodb', False)) }}
config-inituser-login = {{ dumps(inituser_login) }}
config-inituser-password-hashed = ${publish-early:inituser-password-hashed}
config-kumofs-url = ${request-memcached-persistent:connection-url}
......
......@@ -16,6 +16,7 @@
{% set test_runner_node_count = slapparameter_dict['test-runner-node-count'] -%}
{% set test_runner_random_activity_priority = slapparameter_dict['test-runner-random-activity-priority'] -%}
{% set longrequest_logger_base_path = buildout_directory ~ '/var/log/longrequest_logger_' -%}
{% set zope_expect_backingup_zodb = slapparameter_dict['zope-expect-backingup-zodb'] -%}
{% if webdav -%}
{% set timerserver_interval = 0 -%}
{% else -%}
......@@ -363,7 +364,7 @@ wrapped-command-line =
{%- if private_dev_shm %}
private-tmpfs = {{ private_dev_shm }} /dev/shm
{%- endif %}
wrapper-path = ${directory:service-on-watch}/{{ name }}
wrapper-path = ${directory:services}/{{ name }}
hash-files =
${:configuration-file}
hash-existing-files =
......@@ -373,12 +374,14 @@ configuration-file = {{ '${' ~ conf_name ~ ':output}' }}
instance-home = ${directory:instance}
port = {{ port }}
{% if not zope_expect_backingup_zodb -%}
[{{ section("promise-" ~ name) }}]
<= monitor-promise-base
promise = check_socket_listening
name = {{ name }}.py
config-host = {{ ipv4 }}
config-port = {{ port }}
{%- endif %}
{% if use_ipv6 -%}
[{{ zope_tunnel_section_name }}]
......
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