Commit ba3dd231 authored by Alain Takoudjou's avatar Alain Takoudjou

monitor: check_free_disk_space promise moved to slapos.toolbox promise plugin

parent 140b987c
......@@ -78,7 +78,6 @@ scripts =
monitor.genstatus
monitor.configwrite
is-process-older-than-dependency-set
check-free-disk
check-computer-memory
[monitor-eggs]
......
......@@ -34,7 +34,6 @@ scripts =
monitor.genstatus
monitor.configwrite
is-process-older-than-dependency-set
check-free-disk
[extra-eggs]
recipe = zc.recipe.egg
......
......@@ -14,4 +14,4 @@
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum = b30c47a593299da9889035850a47c519
md5sum = a2da18b7e1d4ae1332e19e5d1b70fcdf
......@@ -88,7 +88,7 @@ parameter-file-path = ${monitor-instance-parameter:configuration-file-path}
parameter-list =
raw monitor-user ${monitor-instance-parameter:username}
htpasswd monitor-password ${httpd-monitor-htpasswd:password-file} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path}
file min-free-disk-MB ${promise-check-free-disk-space:config-file}
file min-free-disk-MB ${promise-check-free-disk-space:config-threshold-file}
${monitor-instance-parameter:instance-configuration}
# htpasswd entry: htpasswd key password-file username htpasswd-file
......@@ -377,13 +377,15 @@ config-monitor-url = ${monitor-instance-parameter:monitor-base-url}
mode = 600
[promise-check-free-disk-space]
recipe = slapos.cookbook:wrapper
command-line = {{ check_disk_space }}
--collectordb ${monitor-instance-parameter:collector-db}
--home_path ${buildout:directory}
--config ${:config-file}
wrapper-path = ${directory:promises}/check-free-disk-space
config-file = ${directory:etc}/min-free-disk-size
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
output = ${directory:plugins}/check-free-disk-space.py
content =
from slapos.promise.plugin.check_free_disk_space import RunPromise
mode = 600
config-collectordb = ${monitor-instance-parameter:collector-db}
config-threshold-file = ${directory:etc}/min-free-disk-size
[monitor-base]
......
  • @alain.takoudjou since this commit SLAPOS-CADDY-FRONTEND-MASTER fails, as promise/check-free-disk-space is not available in monitored instances anymore.

    Are there are actions to take in order to have check-free-disk-space promise available on the profile level? Before it was coming from using monitor.

  • Łukasz Nowak @luke

    mentioned in merge request !389 (merged)

    ·

    mentioned in merge request !389 (merged)

    Toggle commit list
  • Ok, I confirmed that it can be detected now by presence of etc/promise/check-free-disk-space.py, I will fix assertions.

  • @luke yes, etc/promise/check-free-disk-space was replaced by etc/plugin/check-free-disk-space.py. Thanks for updating.

    All new promises should be writen like that.

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