Add weight decrease to keepalived checks
Currently keepalived ping checks don't have any weight configuration, which means that if a ping check fails, the VIP will transition to FAULT state. This also means, that if ping check fails for all keepalived instances, the VIP will be unreachable. In the general use case this is undesirable as we don't want for example hitting a icmp rate limit or a routing issue causing problems to just reach the ping endpoint to cause a full outage. This commit instead makes keepalived use weight decrease to still keep the behavior of failing VIP over if a node loses connectivity, but if all nodes are having failed connectivity VIP will still be kept up. The value of 101 is selected to make sure a failed node will always have a lower effective priority than any node that has not failed. Change-Id: I618329785e86c8a6b1f4a41b90601c2a908f3fea
This commit is contained in:
@@ -37,6 +37,7 @@ keepalived_scripts:
|
||||
src_check_script: "{{ playbook_dir }}/../scripts/keepalived_pingable_check.sh"
|
||||
interval: "{{ keepalived_ping_interval }}"
|
||||
instance: external
|
||||
weight: -101
|
||||
fall: 2
|
||||
rise: 4
|
||||
pingable_check_script_internal:
|
||||
@@ -45,6 +46,7 @@ keepalived_scripts:
|
||||
src_check_script: "{{ playbook_dir }}/../scripts/keepalived_pingable_check.sh"
|
||||
interval: "{{ keepalived_ping_interval }}"
|
||||
instance: internal
|
||||
weight: -101
|
||||
fall: 2
|
||||
rise: 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user