Commit b7a13554 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 4126c264
...@@ -74,7 +74,7 @@ md5sum = 3f7b28085ceff321a3cb785db60f7c3e ...@@ -74,7 +74,7 @@ md5sum = 3f7b28085ceff321a3cb785db60f7c3e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = e93128637acb4ebb04423cd1e2c0ce08 md5sum = 4fd0cdd7d335baec896e36f6b63f4cf5
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
......
...@@ -283,6 +283,7 @@ software-type = zope ...@@ -283,6 +283,7 @@ software-type = zope
{% set promise_software_url_section_name = 'promise-software-url' ~ partition_name -%} {% 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 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_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') -%} {% set zope_family = zope_parameter_dict.get('family', 'default') -%}
{% do zope_family_name_list.append(zope_family) %} {% do zope_family_name_list.append(zope_family) %}
{% set backend_path = zope_parameter_dict.get('backend-path', '') % {'site-id': site_id} %} {% set backend_path = zope_parameter_dict.get('backend-path', '') % {'site-id': site_id} %}
...@@ -317,6 +318,22 @@ config-activity-timeout = {{ dumps(current_zope_family_override_dict.get('activi ...@@ -317,6 +318,22 @@ config-activity-timeout = {{ dumps(current_zope_family_override_dict.get('activi
{% if test_runner_enabled -%} {% if test_runner_enabled -%}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list} 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) -%}
[{{ check_test_runner_url_section_name }}] [{{ check_test_runner_url_section_name }}]
# Promise to wait for zope partition to receive the expected test-runner URL # Promise to wait for zope partition to receive the expected test-runner URL
recipe = slapos.cookbook:check_parameter recipe = slapos.cookbook:check_parameter
......
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