Commit 1b978118 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Set minimum amount of info for destroyed nodes

parent aa618130
...@@ -26,7 +26,7 @@ md5sum = 02ce5d44d49982fda598e3086cfbca99 ...@@ -26,7 +26,7 @@ md5sum = 02ce5d44d49982fda598e3086cfbca99
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = bc2a8550c9b603bdfacd3a30a0189218 md5sum = 4c0d7f947d52d594987c2544b65c92e1
[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
......
...@@ -304,13 +304,13 @@ software-url = {{ frontend_request['software-url'] }} ...@@ -304,13 +304,13 @@ software-url = {{ frontend_request['software-url'] }}
{% if state %} {% if state %}
state = {{ state }} state = {{ state }}
{% endif %} {% endif %}
{# Do not send additional parameters for destroyed nodes #}
{% if state != 'destroyed' %}
config-slave-kedifa-information = ${request-kedifa:connection-slave-kedifa-information} config-slave-kedifa-information = ${request-kedifa:connection-slave-kedifa-information}
config-kedifa-caucase-url = ${request-kedifa:connection-caucase-url} config-kedifa-caucase-url = ${request-kedifa:connection-caucase-url}
config-backend-client-caucase-url = {{ caucase_url }} config-backend-client-caucase-url = {{ caucase_url }}
config-master-key-download-url = ${request-kedifa:connection-master-key-download-url} config-master-key-download-url = ${request-kedifa:connection-master-key-download-url}
config-cluster-identification = {{ instance_parameter_dict['root-instance-title'] }} config-cluster-identification = {{ instance_parameter_dict['root-instance-title'] }}
{# Do not send additional parameters for destroyed nodes #}
{% if state != 'destroyed' %}
{% set node_configuration_dict = {} %} {% set node_configuration_dict = {} %}
{% do node_configuration_dict.update(frontend_request.get('config')) %} {% do node_configuration_dict.update(frontend_request.get('config')) %}
{# sort_keys are important in order to avoid shuffling parameters on each run #} {# sort_keys are important in order to avoid shuffling parameters on each run #}
...@@ -322,12 +322,15 @@ config-{{ config_key }} = {{ dumps(config_value) }} ...@@ -322,12 +322,15 @@ config-{{ config_key }} = {{ dumps(config_value) }}
{%- for config_key, config_value in base_node_configuration_dict.iteritems() %} {%- for config_key, config_value in base_node_configuration_dict.iteritems() %}
config-{{ config_key }} = {{ dumps(config_value) }} config-{{ config_key }} = {{ dumps(config_value) }}
{% endfor -%} {% endfor -%}
{% endif %}
{% if frontend_request.get('sla') %} {% if frontend_request.get('sla') %}
{% for parameter, value in frontend_request.get('sla').iteritems() %} {% for parameter, value in frontend_request.get('sla').iteritems() %}
sla-{{ parameter }} = {{ value }} sla-{{ parameter }} = {{ value }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% else %}
{# Ignore return for destroyed nodes #}
return =
{% endif %}
{% endfor %} {% endfor %}
{% set warning_list = [] %} {% set warning_list = [] %}
......
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