Commit c456f805 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Cleanup var/auth-ready

Slaves can disapper during handling of authentication, which will result
with prepared reservation, but with any chance to mark that it's ready.
parent d80b97f8
......@@ -102,7 +102,7 @@ md5sum = 1c866272ec0ea0c161f0c0d80cb6e584
[profile-kedifa]
filename = instance-kedifa.cfg.in
md5sum = b757e0409ec3e70679a8fc4aab4a065f
md5sum = 40fe46a1fe653406b18ca46351d195b8
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
......@@ -280,9 +280,19 @@ command =
[ ! -f ${:file} ] && {{ software_parameter_dict['curl'] }}/bin/curl -s -g -X POST https://[${kedifa-config:ip}]:${kedifa-config:port}/reserve-id --cert ${kedifa-config:certificate} --cacert ${kedifa-config:ca-certificate} > ${:file}.tmp && mv ${:file}.tmp ${:file}
update-command = ${:command}
[auth-random]
[cleanup-auth-ready]
# Cleans auth-ready as some slaves can appear and be configured, but then
# become removed before auth-random kicks in
recipe = slapos.recipe.build
directory = ${directory:auth-ready}
init =
import os
if os.path.isdir(options['directory']):
os.system("find %s -type f -name *-auth-random -size 0 -delete" % (options['directory'],))
[auth-random]
recipe = slapos.recipe.build
directory = ${cleanup-auth-ready:directory}
auth-ready = ${directory:auth-ready}/${:_buildout_section_name_}
init =
import os
......
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