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

caddy-frontend: Fetch CSR id only if not available yet

CSR id shall be requested only when it's not available yet, as otherwise it
contacts caucase server needlessly, and in some circumstances it can result
with bogus new CSR.
parent 4a204baf
Pipeline #19862 failed with stage
in 0 seconds
...@@ -30,7 +30,7 @@ md5sum = c5d1e235959a877b4f3157369c6f5e10 ...@@ -30,7 +30,7 @@ md5sum = c5d1e235959a877b4f3157369c6f5e10
[profile-slave-list] [profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = c67e172c0c6eca955b18962404056a33 md5sum = 9e77ca5d41541787f66a4e1872556418
[profile-replicate-publish-slave-information] [profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in _update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
...@@ -102,7 +102,7 @@ md5sum = 59cb33f11272ee09eccea74981d2304a ...@@ -102,7 +102,7 @@ md5sum = 59cb33f11272ee09eccea74981d2304a
[profile-kedifa] [profile-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = dfb4dabd1e4094de1276d171f998ef47 md5sum = 483e834e689f9a943346683e4d81eab4
[template-backend-haproxy-rsyslogd-conf] [template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
...@@ -122,6 +122,7 @@ csr_work_path = ${directory:tmp}/${:_buildout_section_name_} ...@@ -122,6 +122,7 @@ csr_work_path = ${directory:tmp}/${:_buildout_section_name_}
stop-on-error = False stop-on-error = False
update-command = ${:command} update-command = ${:command}
command = command =
[ -f {:csr_id_path} ] && exit 0
{{ software_parameter_dict['bin_directory'] }}/caucase \ {{ software_parameter_dict['bin_directory'] }}/caucase \
--ca-url {{ caucase_url }} \ --ca-url {{ caucase_url }} \
--ca-crt ${kedifa-config:ca-certificate} \ --ca-crt ${kedifa-config:ca-certificate} \
......
...@@ -523,6 +523,7 @@ csr_work_path = {{ directory['tmp'] }}/${:_buildout_section_name_} ...@@ -523,6 +523,7 @@ csr_work_path = {{ directory['tmp'] }}/${:_buildout_section_name_}
stop-on-error = False stop-on-error = False
update-command = ${:command} update-command = ${:command}
command = command =
[ -f ${:csr_id_path} ] && exit 0
{{ software_parameter_dict['bin_directory'] }}/caucase \ {{ software_parameter_dict['bin_directory'] }}/caucase \
--ca-url {{ backend_haproxy_configuration['caucase-url'] }} \ --ca-url {{ backend_haproxy_configuration['caucase-url'] }} \
--ca-crt {{ backend_haproxy_configuration['cas-ca-certificate'] }} \ --ca-crt {{ backend_haproxy_configuration['cas-ca-certificate'] }} \
...@@ -564,6 +565,7 @@ csr_work_path = {{ directory['tmp'] }}/${:_buildout_section_name_} ...@@ -564,6 +565,7 @@ csr_work_path = {{ directory['tmp'] }}/${:_buildout_section_name_}
stop-on-error = False stop-on-error = False
update-command = ${:command} update-command = ${:command}
command = command =
[ -f ${:csr_id_path} ] && exit 0
{{ software_parameter_dict['bin_directory'] }}/caucase \ {{ software_parameter_dict['bin_directory'] }}/caucase \
--ca-url {{ kedifa_configuration['caucase-url'] }} \ --ca-url {{ kedifa_configuration['caucase-url'] }} \
--ca-crt {{ kedifa_configuration['cas-ca-certificate'] }} \ --ca-crt {{ kedifa_configuration['cas-ca-certificate'] }} \
......
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