Commit 6973ffd9 authored by Alain Takoudjou's avatar Alain Takoudjou

monitor: allow to set timeout value for all promises

parent a30c52be
......@@ -34,7 +34,7 @@ class Recipe(GenericBaseRecipe):
"""
def install(self):
timeout_file = os.path.join(os.getcwd(), 'etc/check_url_PROMISE_TIMEOUT')
timeout_file = os.path.join(os.getcwd(), 'etc/promise_timeout')
config = {
'url': self.options['url'],
'shell_path': self.options['dash_path'],
......
......@@ -96,7 +96,7 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
md5sum = f71b96877968d3467976ebdb44eea17e
md5sum = 04b4555615c48fb615dd452294c185e0
context =
key apache_location apache:location
key gzip_location gzip:location
......
......@@ -138,6 +138,7 @@ logrotate-folder = ${logrotate:logrotate-entries}
promise-runner = {{ monitor_runpromise }}
promise-folder = ${directory:promises}
monitor-promise-folder = ${monitor-directory:promises}
promises-timeout-file = ${monitor-promise-timeout-file:file}
pid-file = ${monitor-directory:pids}/monitor-bootstrap.pid
public-path-list =
......@@ -152,7 +153,7 @@ parameter-file-path = ${monitor-instance-parameter:configuration-file-path}
parameter-list =
raw monitor-user ${monitor-instance-parameter:username}
htpasswd monitor-password ${monitor-htpassword-file:password-file} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path}
file promise-url-timeout ${monitor-init-check-url-timeout:file}
file promise-timeout ${monitor-promise-timeout-file:file}
${monitor-instance-parameter:instance-configuration}
# htpasswd entry: htpasswd key password-file username htpasswd-file
......@@ -162,9 +163,9 @@ python = {{ python_with_eggs }}
promise-output-file = ${directory:monitor}/monitor-bootstrap-status
[monitor-init-check-url-timeout]
[monitor-promise-timeout-file]
recipe = plone.recipe.command
file = ${directory:etc}/check_url_PROMISE_TIMEOUT
file = ${directory:etc}/promise_timeout
command =
if [ ! -s "${:file}" ]; then
echo "20" > ${:file}
......
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