From 2fe445c5597cbc3144c9bfa77537a638c55d37dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Opala?= Date: Wed, 17 Jun 2020 12:21:49 +0200 Subject: [PATCH] v0.6 Hotfix: adding condition preventing load_balancer code from crashing (#1362) * load_balancer: adding condition preventing ansible code from crashing * updating changelog for v0.6 --- CHANGELOG-0.3.md | 2 +- CHANGELOG-0.6.md | 1 + .../playbooks/roles/haproxy/templates/haproxy_Debian.cfg.j2 | 4 ++-- .../playbooks/roles/haproxy/templates/haproxy_RedHat.cfg.j2 | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG-0.3.md b/CHANGELOG-0.3.md index be8dcba995..01bbd5bc7c 100644 --- a/CHANGELOG-0.3.md +++ b/CHANGELOG-0.3.md @@ -23,4 +23,4 @@ ### Known issues - Deployment/Application role fails because Kubernetes cluster is not ready after reboot. More info [here](https://github.com/epiphany-platform/epiphany/issues/407) -- Node_exporter ports are not present in defaults resulting in Prometheus not beeing able to scrape data with minimal cluster data.yaml. More info [here](https://github.com/epiphany-platform/epiphany/issues/410) \ No newline at end of file +- Node_exporter ports are not present in defaults resulting in Prometheus not beeing able to scrape data with minimal cluster data.yaml. More info [here](https://github.com/epiphany-platform/epiphany/issues/410) diff --git a/CHANGELOG-0.6.md b/CHANGELOG-0.6.md index 94a876149d..3921f8a957 100644 --- a/CHANGELOG-0.6.md +++ b/CHANGELOG-0.6.md @@ -6,6 +6,7 @@ - [#1154](https://github.com/epiphany-platform/epiphany/issues/1154) - Node exporter is not installed on logging vms - [#1183](https://github.com/epiphany-platform/epiphany/issues/1183) - Task 'Check if /etc/kubernetes/admin.conf file exists' fails when kubernetes\_master.count = 0 +- [#1350](https://github.com/epiphany-platform/epiphany/issues/1350) - Cannot deploy a non-k8s cluster with load\_balancer vm ## [0.6.0] 2020-04-06 diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_Debian.cfg.j2 b/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_Debian.cfg.j2 index be0d06182d..8b3c31ff78 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_Debian.cfg.j2 +++ b/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_Debian.cfg.j2 @@ -19,7 +19,7 @@ global ssl-dh-param-file /etc/haproxy/dhparam - + defaults log global mode http @@ -73,7 +73,7 @@ backend {{ back.name }} option tcp-check mode tcp {%- endif %} - {%- if back.server_groups is defined %} + {%- if back.server_groups is defined and back.server_groups is subset(groups) %} {%- for server_group in back.server_groups %} {%- for server in groups[server_group] %} {%- if back.https is defined and back.https == True %} diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_RedHat.cfg.j2 b/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_RedHat.cfg.j2 index 90567af333..b1a6cff0ff 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_RedHat.cfg.j2 +++ b/core/src/epicli/data/common/ansible/playbooks/roles/haproxy/templates/haproxy_RedHat.cfg.j2 @@ -19,7 +19,7 @@ global ssl-dh-param-file /etc/opt/rh/rh-haproxy18/haproxy/dhparam - + defaults log global mode http @@ -74,7 +74,7 @@ backend {{ back.name }} option tcp-check mode tcp {%- endif %} - {%- if back.server_groups is defined %} + {%- if back.server_groups is defined and back.server_groups is subset(groups) %} {%- for server_group in back.server_groups %} {%- for server in groups[server_group] %} {%- if back.https is defined and back.https == True %}