Commit a88d4d66 authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: check propagation of testrunner url in the root partition

see 2a457867 (erp5: Rework testrunner's HTTP server, 2018-09-04), with
python3 the timing is not same and sometimes the parameter was not
propagated before root partitions promise were all solved, this add a
promise at the root partition to ensure the parameter is propagated
parent c4d1c586
......@@ -74,7 +74,7 @@ md5sum = 3f7b28085ceff321a3cb785db60f7c3e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = 127e220ff2a404574beda5d83fc50a73
md5sum = 55be9819a6c6ae397d04b3ca454c8518
[template-zeo]
filename = instance-zeo.cfg.in
......
......@@ -283,6 +283,7 @@ software-type = zope
{% set promise_software_url_section_name = 'promise-software-url' ~ partition_name -%}
{% set check_test_runner_url_section_name = 'check-test-runner-url' ~ partition_name -%}
{% set promise_test_runner_url_section_name = 'promise-test-runner-url' ~ partition_name -%}
{% set promise_testrunner_balancer_ready_section_name = 'promise-testrunner-balancer-ready-' ~ partition_name -%}
{% set zope_family = zope_parameter_dict.get('family', 'default') -%}
{% do zope_family_name_list.append(zope_family) %}
{% set backend_path = zope_parameter_dict.get('backend-path', '') % {'site-id': site_id} %}
......@@ -316,6 +317,23 @@ config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publi
config-activity-timeout = {{ dumps(current_zope_family_override_dict.get('activity-timeout', global_activity_timeout)) }}
{% if test_runner_enabled -%}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
[{{ promise_testrunner_balancer_ready_section_name }}-executable]
# promise to wait for balancer partition to have returned the parameter
recipe = slapos.cookbook:check_parameter
value = ${publish-early:{{ zope_family }}-test-runner-url-list}
expected-not-value = not-ready
path = ${directory:bin}/${:_buildout_section_name_}
expected-value =
[{{ promise_testrunner_balancer_ready_section_name }}]
<= monitor-promise-base
promise = check_command_execute
name = ${:_buildout_section_name_}.py
config-command = {{ '${' ~ promise_testrunner_balancer_ready_section_name ~ '-executable:path}' }}
{% do root_common.section(promise_testrunner_balancer_ready_section_name) -%}
{% endif -%}
[{{ check_test_runner_url_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