From e22f911d3e890e60069908d9eefebc9267be5ca6 Mon Sep 17 00:00:00 2001 From: Yossi Boaron Date: Sun, 10 May 2020 23:18:05 +0300 Subject: [PATCH] Update fall and rise values in keepalived check scripts Keepalived runs a check script every interval (1 Sec in our case) to calculate VRRP instance's status. The check script must succeed 'rise' times for the instance to be considered as 'healthy and fail 'fall' time to be considered as 'non healthy'. This change updates 'rise' and 'fall' values from the default (1 for both of them) to 3 and 2. --- .../baremetal/files/baremetal-keepalived-keepalived.yaml | 4 ++++ .../openstack/files/openstack-keepalived-keepalived.yaml | 4 ++++ .../00-master/ovirt/files/ovirt-keepalived-keepalived.yaml | 4 ++++ .../vsphere/files/vsphere-keepalived-keepalived.yaml | 4 ++++ .../baremetal/files/baremetal-keepalived-keepalived.yaml | 2 ++ .../openstack/files/openstack-keepalived-keepalived.yaml | 2 ++ .../00-worker/ovirt/files/ovirt-keepalived-keepalived.yaml | 2 ++ .../vsphere/files/vsphere-keepalived-keepalived.yaml | 2 ++ 8 files changed, 24 insertions(+) diff --git a/templates/master/00-master/baremetal/files/baremetal-keepalived-keepalived.yaml b/templates/master/00-master/baremetal/files/baremetal-keepalived-keepalived.yaml index d34779f30f..2b42aa95dd 100644 --- a/templates/master/00-master/baremetal/files/baremetal-keepalived-keepalived.yaml +++ b/templates/master/00-master/baremetal/files/baremetal-keepalived-keepalived.yaml @@ -7,6 +7,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs https://localhost:6443/readyz" interval 1 weight 50 + rise 3 + fall 2 } # TODO: Improve this check. The port is assumed to be alive. @@ -15,6 +17,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://localhost:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_API { diff --git a/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml b/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml index 8729439ada..7336158feb 100644 --- a/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml +++ b/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml @@ -7,11 +7,15 @@ contents: script "/usr/bin/curl -o /dev/null -kLs https://localhost:6443/readyz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_script chk_dns { script "/usr/bin/host -t SRV _etcd-server-ssl._tcp.{{ .EtcdDiscoveryDomain }} localhost" interval 1 weight 50 + rise 3 + fall 2 } # TODO: Improve this check. The port is assumed to be alive. # Need to assess what is the ramification if the port is not there. diff --git a/templates/master/00-master/ovirt/files/ovirt-keepalived-keepalived.yaml b/templates/master/00-master/ovirt/files/ovirt-keepalived-keepalived.yaml index 7e43e69de9..26391b1101 100644 --- a/templates/master/00-master/ovirt/files/ovirt-keepalived-keepalived.yaml +++ b/templates/master/00-master/ovirt/files/ovirt-keepalived-keepalived.yaml @@ -13,6 +13,8 @@ contents: script "/usr/bin/host -t SRV _etcd-server-ssl._tcp.{{ .EtcdDiscoveryDomain }} localhost" interval 1 weight 50 + rise 3 + fall 2 } # TODO: Improve this check. The port is assumed to be alive. @@ -21,6 +23,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://0:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_API { diff --git a/templates/master/00-master/vsphere/files/vsphere-keepalived-keepalived.yaml b/templates/master/00-master/vsphere/files/vsphere-keepalived-keepalived.yaml index e0c2623c1d..43f6d9a0a9 100644 --- a/templates/master/00-master/vsphere/files/vsphere-keepalived-keepalived.yaml +++ b/templates/master/00-master/vsphere/files/vsphere-keepalived-keepalived.yaml @@ -9,6 +9,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs https://localhost:6443/readyz" interval 1 weight 50 + rise 3 + fall 2 } # TODO: Improve this check. The port is assumed to be alive. @@ -17,6 +19,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://localhost:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_API { diff --git a/templates/worker/00-worker/baremetal/files/baremetal-keepalived-keepalived.yaml b/templates/worker/00-worker/baremetal/files/baremetal-keepalived-keepalived.yaml index 7b8170f4dd..719a1527ae 100644 --- a/templates/worker/00-worker/baremetal/files/baremetal-keepalived-keepalived.yaml +++ b/templates/worker/00-worker/baremetal/files/baremetal-keepalived-keepalived.yaml @@ -9,6 +9,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://0:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_INGRESS { diff --git a/templates/worker/00-worker/openstack/files/openstack-keepalived-keepalived.yaml b/templates/worker/00-worker/openstack/files/openstack-keepalived-keepalived.yaml index ccc9b91ca6..d2897ad772 100644 --- a/templates/worker/00-worker/openstack/files/openstack-keepalived-keepalived.yaml +++ b/templates/worker/00-worker/openstack/files/openstack-keepalived-keepalived.yaml @@ -9,6 +9,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://0:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_INGRESS { state BACKUP diff --git a/templates/worker/00-worker/ovirt/files/ovirt-keepalived-keepalived.yaml b/templates/worker/00-worker/ovirt/files/ovirt-keepalived-keepalived.yaml index 7b8170f4dd..719a1527ae 100644 --- a/templates/worker/00-worker/ovirt/files/ovirt-keepalived-keepalived.yaml +++ b/templates/worker/00-worker/ovirt/files/ovirt-keepalived-keepalived.yaml @@ -9,6 +9,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://0:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_INGRESS { diff --git a/templates/worker/00-worker/vsphere/files/vsphere-keepalived-keepalived.yaml b/templates/worker/00-worker/vsphere/files/vsphere-keepalived-keepalived.yaml index e5866a6baf..7b3bd12764 100644 --- a/templates/worker/00-worker/vsphere/files/vsphere-keepalived-keepalived.yaml +++ b/templates/worker/00-worker/vsphere/files/vsphere-keepalived-keepalived.yaml @@ -11,6 +11,8 @@ contents: script "/usr/bin/curl -o /dev/null -kLs http://0:1936/healthz" interval 1 weight 50 + rise 3 + fall 2 } vrrp_instance {{`{{ .Cluster.Name }}`}}_INGRESS {