Commit c1a9a65b authored by Rafael Monnerat's avatar Rafael Monnerat

monitor: Add promise to check if monitor httpd was restarted since the last upgrade

parent 1c2591fc
......@@ -102,7 +102,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 = bf0adf565d7cde55abc94bd223ec3162
md5sum = 212bcd86244e8a4e51fff92cfbd7d5f7
context =
key apache_location apache:location
key gzip_location gzip:location
......@@ -125,6 +125,7 @@ context =
raw python_with_eggs ${buildout:directory}/bin/${extra-eggs:interpreter}
raw template_wrapper ${monitor-template-wrapper:location}/${monitor-template-wrapper:filename}
raw template_check_disk_space ${monitor-check-free-disk-space:location}/${monitor-check-free-disk-space:filename}
raw bin_directory ${buildout:directory}/bin
depends =
${monitor-eggs:eggs}
......
......@@ -239,6 +239,12 @@ input = inline:#!/bin/sh
output = ${directory:bin}/xnice
mode = 700
[promise-monitor-httpd-is-process-older-than-dependency-set]
recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/is-process-older-than-dependency-set ${monitor-httpd-conf-parameter:pid-file}
wrapper-path = ${directory:promises}/promise-monitor-httpd-is-process-older-than-dependency-set
parameters-extra = true
[monitor-globalstate-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${xnice-bin:output} {{ monitor_genstatus }} '${monitor-conf:rendered}' '${monitor-instance-info:rendered}'
......@@ -385,6 +391,7 @@ depends =
${monitor-httpd-promise:filename}
${monitor-bootstrap-promise:file}
${promise-check-slapgrid:output}
${promise-monitor-httpd-is-process-older-than-dependency-set:wrapper-path}
[monitor-publish]
monitor-base-url = ${publish:monitor-base-url}
......@@ -394,4 +401,4 @@ monitor-setup-url = ${monitor-instance-parameter:interface-url}/#page=settings_c
[buildout]
extends =
{{ template_logrotate_base }}
\ No newline at end of file
{{ template_logrotate_base }}
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