From aa9f6fef715a61462e3e92309266dd9e7fdfbd0c Mon Sep 17 00:00:00 2001 From: lixiaoxiao Date: Mon, 25 Mar 2024 20:17:12 +0800 Subject: [PATCH] bugfix: keepalived new_vs quorum_state_up always be true and quorum_up script will not be excuted when all old rs(healthcheck is alive) are removed and new rs(healthcheck is alive) add in same reload. --- tools/keepalived/keepalived/check/ipwrapper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/keepalived/keepalived/check/ipwrapper.c b/tools/keepalived/keepalived/check/ipwrapper.c index d2658c06..80980b0b 100755 --- a/tools/keepalived/keepalived/check/ipwrapper.c +++ b/tools/keepalived/keepalived/check/ipwrapper.c @@ -1024,6 +1024,12 @@ clear_diff_rs(virtual_server_t *old_vs, virtual_server_t *new_vs, list old_check } } clear_service_rs(old_vs, rs_to_remove, false); + + //keep new_vs quorum_state_up same with old_vs + if (old_vs->quorum_state_up != new_vs->quorum_state_up) { + new_vs->quorum_state_up = old_vs->quorum_state_up; + } + free_list(&rs_to_remove); }