Commit 249eef58 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 ddf5c696
......@@ -737,6 +737,18 @@
}
},
"type": "object"
},
"monitor": {
"type": "object",
"additionalProperties": false,
"description": "Monitor parameters (unstable/experimental)",
"properties": {
"zope-expect-backingup-zodb": {
"type": "boolean",
"description": "Whether zope should expect the zodb to be a neo in BACKINGUP mode",
"default": false
}
}
}
}
}
......@@ -74,7 +74,7 @@ md5sum = 2820cc6073263a0e1290b76a485e9c54
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = f767cd0299839117628964b7ef98fd38
md5sum = 3d2207e782c43584c52d03ab703bd258
[template-zeo]
filename = instance-zeo.cfg.in
......@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope]
filename = instance-zope.cfg.in
md5sum = 6178ba7b42848f9e2412ab898a7b026c
md5sum = 383942e8dff2be68a0f0f7916d3abf19
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -242,6 +242,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 -%}
......@@ -357,7 +358,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 =
......@@ -368,7 +369,7 @@ instance-home = ${directory:instance}
port = {{ port }}
[{{ section("promise-" ~ name) }}]
{% if six.PY3 -%}
{% if six.PY3 or zope_expect_backingup_zodb -%}
# Disable the promise in Python 3. ERP5 is not compatible with Python 3 yet, so
# the promise would always fail.
recipe =
......
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