Commit 62365dbe 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 380ba486
...@@ -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 = ad071817b2cbc29d825282fea1fb3aa1 md5sum = e3726ac02ba90778df227f2c2bba3f97
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
......
...@@ -281,6 +281,7 @@ software-type = zope ...@@ -281,6 +281,7 @@ software-type = zope
{% set partition_name = 'zope-' ~ custom_name -%} {% set partition_name = 'zope-' ~ custom_name -%}
{% set section_name = 'request-' ~ partition_name -%} {% set section_name = 'request-' ~ partition_name -%}
{% set promise_software_url_section_name = 'promise-software-url' ~ partition_name -%} {% set promise_software_url_section_name = 'promise-software-url' ~ partition_name -%}
{% set promise_testrunner_balancer_ready_section_name = 'promise-tesrunner-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} %}
...@@ -314,6 +315,23 @@ config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publi ...@@ -314,6 +315,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)) }} config-activity-timeout = {{ dumps(current_zope_family_override_dict.get('activity-timeout', global_activity_timeout)) }}
{% 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) -%}
{% endif -%} {% endif -%}
[{{ promise_software_url_section_name }}] [{{ promise_software_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