software/slaprunner: Fix switch to monitor-promise-base
Showing
... | ... | @@ -85,20 +85,18 @@ config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }} |
return = site_url domain | ||
[custom-frontend-promise] | ||
recipe = slapos.cookbook:check_url_available | ||
path = $${directory:promises}/custom_frontend_promise | ||
url = https://$${request-custom-frontend:connection-domain} | ||
<= monitor-promise-base | ||
module = check_url_available | ||
name = custom_frontend_promise.py | ||
config-url = https://$${request-custom-frontend:connection-domain} | ||
{% if slapparameter_dict.get('custom-frontend-basic-auth') -%} | ||
check-secure = 1 | ||
config-check-secure = 1 | ||
{% endif -%} | ||
dash_path = {{ dash_executable_location }} | ||
curl_path = {{ curl_executable_location }} | ||
[custom-frontend-url-ready-promise] | ||
[custom-frontend-url-ready-promise-bin] | ||
|
||
recipe = slapos.recipe.template:jinja2 | ||
path = $${directory:promises}/custom_frontend_ready_promise | ||
url = https://$${request-custom-frontend:connection-domain} | ||
rendered = $${directory:promises}/custom_frontend_ready_promise | ||
rendered = $${directory:bin}/custom_frontend_ready_promise | ||
template = inline: | ||
#!{{ dash_executable_location }} | ||
... | ... | @@ -110,6 +108,12 @@ template = inline: |
exit 1 | ||
fi | ||
[custom-frontend-url-ready-promise] | ||
<= monitor-promise-base | ||
module = check_command_execute | ||
name = custom_frontend_ready_promise.py | ||
config-command = $${custom-frontend-url-ready-promise-bin:rendered} | ||
[publish-connection-information] | ||
custom-frontend-url = $${custom-frontend-url-ready-promise:url} | ||
|
||
{% endif %} | ||
... | ... | @@ -135,7 +139,6 @@ ssh = $${:etc}/ssh/ |
log = $${:var}/log/ | ||
run = $${:var}/run/ | ||
backup = $${:srv}/backup/ | ||
promises = $${:etc}/promise/ | ||
test = $${:etc}/test/ | ||
nginx-data = $${:srv}/nginx | ||
ca-dir = $${:srv}/ssl | ||
... | ... | @@ -476,13 +479,12 @@ output = $${directory:scripts}/slaprunner-httpd-graceful |
mode = 700 | ||
[apache-httpd-promise] | ||
recipe = slapos.cookbook:check_url_available | ||
path = $${directory:promises}/$${:filename} | ||
<= monitor-promise-base | ||
module = check_url_available | ||
name = $${:filename}.py | ||
filename = apache-httpd-listening-on-tcp | ||
url = $${apache-httpd:access-url} | ||
check-secure = 1 | ||
dash_path = {{ dash_executable_location }} | ||
curl_path = {{ curl_executable_location }} | ||
config-url = $${apache-httpd:access-url} | ||
config-check-secure = 1 | ||
[slaprunner-httpd-cors] | ||
recipe = plone.recipe.command | ||
... | ... | @@ -579,12 +581,11 @@ config-domain = $${slap-parameter:frontend-domain} |
return = site_url domain | ||
[slaprunner-frontend-promise] | ||
recipe = slapos.cookbook:check_url_available | ||
path = $${directory:promises}/slaprunner_frontend | ||
url = https://$${request-frontend:connection-domain}/login | ||
dash_path = ${dash:location}/bin/dash | ||
curl_path = ${curl:location}/bin/curl | ||
check-secure = 1 | ||
<= monitor-promise-base | ||
module = check_url_available | ||
name = slaprunner_frontend.py | ||
config-url = https://$${request-frontend:connection-domain}/login | ||
config-check-secure = 1 | ||
[request-httpd-frontend] | ||
<= slap-connection | ||
... | ... | @@ -600,12 +601,11 @@ config-domain = |
return = secure_access domain | ||
[httpd-frontend-promise] | ||
recipe = slapos.cookbook:check_url_available | ||
path = $${directory:promises}/slaprunner-apache-http-frontend | ||
url = $${request-httpd-frontend:connection-secure_access} | ||
dash_path = {{ dash_executable_location }} | ||
curl_path = {{ curl_executable_location }} | ||
check-secure = 1 | ||
<= monitor-promise-base | ||
module = check_url_available | ||
name = slaprunner-apache-http-frontend.py | ||
config-url = $${request-httpd-frontend:connection-secure_access} | ||
config-check-secure = 1 | ||
{% endif %} | ||
... | ... | @@ -667,16 +667,18 @@ monitor-password = $${monitor-publish-parameters:monitor-password} |
#-- Deploy promises scripts | ||
[slaprunner-promise] | ||
recipe = slapos.cookbook:check_port_listening | ||
path = $${directory:promises}/slaprunner | ||
hostname = $${slaprunner:ipv6} | ||
port = $${slaprunner:runner_port} | ||
<= monitor-promise-base | ||
module = check_port_listening | ||
name = slaprunner.py | ||
config-hostname = $${slaprunner:ipv6} | ||
config-port = $${slaprunner:runner_port} | ||
[runner-sshd-promise] | ||
recipe = slapos.cookbook:check_port_listening | ||
path = $${directory:promises}/runner-sshd | ||
hostname = $${slap-network-information:global-ipv6} | ||
port = $${runner-sshd-port:port} | ||
<= monitor-promise-base | ||
module = check_port_listening | ||
name = runner-sshd.py | ||
config-hostname = $${slap-network-information:global-ipv6} | ||
config-port = $${runner-sshd-port:port} | ||
[symlinks] | ||
recipe = cns.recipe.symlink | ||
... | ... | @@ -891,10 +893,11 @@ name = slapgrid |
log = $${runnerdirectory:home}/instance/*/.slapgrid/log/instance.log $${runnerdirectory:home}/instance/*/.slapgrid/promise/log/*.log | ||
[supervisord-promise] | ||
recipe = slapos.cookbook:check_port_listening | ||
path = $${directory:promises}/supervisord | ||
hostname = $${slaprunner:ipv4} | ||
port = $${supervisord:port} | ||
<= monitor-promise-base | ||
module = check_port_listening | ||
name = supervisord.py | ||
config-hostname = $${slaprunner:ipv4} | ||
config-port = $${supervisord:port} | ||
# XXX Monitor | ||
[monitor-instance-parameter] | ||
... | ... |
-
Owner
In order to fix, I suggest this commit : tomo/slapos@a514a2b3
I tested in production and it works
-
Maintainer
I will pick up your commit, add a test for it and will push it on nexedi/master ASAP. Thanks for catching this issue!