Commit d49efea0 authored by Alain Takoudjou's avatar Alain Takoudjou

[monitor] promise-check-slapgrid: prevent display sensitive information in promise output

This promise fail if slapgrid failed to process the partition and verbose the failed buildout log. It's possible that buildout logs contain information that should not be public, so put the log in a private folder and add the link to it to the promise result.
parent 14b5d31d
......@@ -15,4 +15,4 @@
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum = 5027f0b1abcc28ce3817cd70fb667a3b
md5sum = 1bfd846dbfefbefde42b117676f82e1e
......@@ -369,8 +369,12 @@ mode = 700
recipe = collective.recipe.template
error-log-file = ${buildout:directory}/.slapgrid-${slap-connection:partition-id}-error.log
input = inline:#!/bin/sh
BUILDOUT_LOG="${directory:log}/slapgrid-${slap-connection:partition-id}-error.log"
rm -f $BUILDOUT_LOG
if [ -f "${:error-log-file}" ]; then
>&2 cat ${:error-log-file}
ln -sf ${:error-log-file} $BUILDOUT_LOG
>&2 echo "Buildout failed to process partition ${slap-connection:partition-id}"
>&2 echo "More info can be found here: ${monitor-base:base-url}/log/.slapgrid-${slap-connection:partition-id}-error.log"
exit 1
fi
output = ${monitor-directory:promises}/buildout-${slap-connection:partition-id}-status
......
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