Commit 854057ce authored by Jérome Perrin's avatar Jérome Perrin

monitor: use monitor- prefix in cert and key

By using a short filenames like "httpd.crt" or "httpd.key", we risk have
conflict with users of this stack. Use a name with more context, that
should likely not be used by applications.

This solves an issue with lamp stack, that was visible with nextcloud
software:

     While:
       Installing ca-apache-php.
     Error: The following paths are already installed by other sections: {'/srv/slapgrid/slappart8/srv/testnode/cvt/inst/test0-0/tmp/inst/ncs2/srv/ssl/certs/httpd.key': 'ca-monitor-httpd', '/srv/slapgrid/slappart8/srv/testnode/cvt/inst/test0-0/tmp/inst/ncs2/srv/ssl/certs/httpd.crt': 'ca-monitor-httpd'}
parent 1771df7b
Pipeline #8765 failed with stage
in 0 seconds
......@@ -14,7 +14,7 @@
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum = e1c7d1c21a942064e2f3f40463b10177
md5sum = 84bc2cf29e34b48c51116d93e2be7636
[monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in
......
......@@ -165,8 +165,8 @@ port = ${monitor-instance-parameter:monitor-httpd-port}
pid-file = ${directory:run}/monitor-httpd.pid
access-log = ${directory:log}/monitor-httpd-access.log
error-log = ${directory:log}/monitor-httpd-error.log
cert-file = ${ca-directory:certs}/httpd.crt
key-file = ${ca-directory:certs}/httpd.key
cert-file = ${ca-directory:certs}/monitor-httpd.crt
key-file = ${ca-directory:certs}/monitor-httpd.key
htpasswd-file = ${httpd-monitor-htpasswd:htpasswd-path}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
httpd-cors-config-file = ${monitor-httpd-cors:rendered}
......@@ -194,8 +194,8 @@ recipe = slapos.cookbook:wrapper
command-line = {{ apache_location }}/bin/httpd -f ${monitor-httpd-conf:rendered} -DFOREGROUND
wrapper-path = ${directory:bin}/monitor-httpd
wait-for-files =
${ca-directory:certs}/httpd.key
${ca-directory:certs}/httpd.crt
${monitor-httpd-conf-parameter:key-file}
${monitor-httpd-conf-parameter:cert-file}
${monitor-httpd-graceful-wrapper:rendered}
[monitor-httpd-graceful-wrapper]
......
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