Commit 5bc13ce9 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Do not process destroyed nodes

parent 4454fb76
...@@ -26,7 +26,7 @@ md5sum = e7d7e1448b6420657e953026573311ca ...@@ -26,7 +26,7 @@ md5sum = e7d7e1448b6420657e953026573311ca
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 7f07b19d7f3d2941b30dddadcf32c924 md5sum = 59f3a67999f5fb3e595486e2b801af08
[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
......
...@@ -89,16 +89,19 @@ context = ...@@ -89,16 +89,19 @@ context =
{% endfor %} {% endfor %}
{% do config_dict.__setitem__('monitor-httpd-port', frontend_monitor_httpd_base_port + i) %} {% do config_dict.__setitem__('monitor-httpd-port', frontend_monitor_httpd_base_port + i) %}
{% do config_dict.__setitem__('backend-client-caucase-url', caucase_url) %} {% do config_dict.__setitem__('backend-client-caucase-url', caucase_url) %}
{% set state_key = "-frontend-%s-state" % i %}
{% set frontend_state = slapparameter_dict.pop(state_key, None) %}
{% if frontend_state != 'destroyed' %}
{% do frontend_list.append(frontend_name) %} {% do frontend_list.append(frontend_name) %}
{% do frontend_section_list.append(request_section_title) %} {% do frontend_section_list.append(request_section_title) %}
{% endif %}
{% do part_list.append(request_section_title) %} {% do part_list.append(request_section_title) %}
# Filling request dict for slave # Filling request dict for slave
{% set state_key = "-frontend-%s-state" % i %}
{% set request_content_dict = { {% set request_content_dict = {
'config': config_dict, 'config': config_dict,
'name': frontend_name, 'name': frontend_name,
'sla': sla_dict, 'sla': sla_dict,
'state': slapparameter_dict.pop(state_key, None) 'state': frontend_state
} %} } %}
{% set frontend_software_url_key = "-frontend-%s-software-release-url" % i %} {% set frontend_software_url_key = "-frontend-%s-software-release-url" % i %}
{% do request_content_dict.__setitem__('software-url', slapparameter_dict.get(frontend_software_url_key) or '${slap-connection:software-release-url}') %} {% do request_content_dict.__setitem__('software-url', slapparameter_dict.get(frontend_software_url_key) or '${slap-connection:software-release-url}') %}
......
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