|
|
ad0d7c |
From 8e42d6970457336bd92d327c628e38129f221f8a Mon Sep 17 00:00:00 2001
|
|
|
ad0d7c |
From: Quentin Armitage <quentin@armitage.org.uk>
|
|
|
ad0d7c |
Date: Mon, 17 Jul 2017 11:43:28 +0100
|
|
|
ad0d7c |
Subject: [PATCH] Correct comparison for checker compare in
|
|
|
ad0d7c |
migrate_failed_checkers
|
|
|
ad0d7c |
|
|
|
ad0d7c |
Commit 2ff6b3f changed the sense of the comparisons of checkers,
|
|
|
ad0d7c |
but didn't make the corresponding change to checking the result.
|
|
|
ad0d7c |
|
|
|
ad0d7c |
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
|
|
|
ad0d7c |
---
|
|
|
ad0d7c |
keepalived/check/check_api.c | 4 ++--
|
|
|
ad0d7c |
keepalived/check/ipwrapper.c | 2 +-
|
|
|
ad0d7c |
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
ad0d7c |
|
|
|
ad0d7c |
diff --git a/keepalived/check/check_api.c b/keepalived/check/check_api.c
|
|
|
ad0d7c |
index 1d915414..82b0f2df 100644
|
|
|
ad0d7c |
--- a/keepalived/check/check_api.c
|
|
|
ad0d7c |
+++ b/keepalived/check/check_api.c
|
|
|
ad0d7c |
@@ -266,8 +266,8 @@ register_checkers_thread(void)
|
|
|
ad0d7c |
|
|
|
ad0d7c |
for (e = LIST_HEAD(checkers_queue); e; ELEMENT_NEXT(e)) {
|
|
|
ad0d7c |
checker = ELEMENT_DATA(e);
|
|
|
ad0d7c |
- log_message(LOG_INFO, "%sctivating healthchecker for service %s"
|
|
|
ad0d7c |
- , checker->enabled ? "A" : "Dea", FMT_VS(checker->vs));
|
|
|
ad0d7c |
+ log_message(LOG_INFO, "%sctivating healthchecker for service %s"
|
|
|
ad0d7c |
+ , checker->enabled ? "A" : "Dea", FMT_VS(checker->vs));
|
|
|
ad0d7c |
if (checker->launch)
|
|
|
ad0d7c |
{
|
|
|
ad0d7c |
/* wait for a random timeout to begin checker thread.
|
|
|
ad0d7c |
diff --git a/keepalived/check/ipwrapper.c b/keepalived/check/ipwrapper.c
|
|
|
ad0d7c |
index 17f0157d..ad8c3154 100644
|
|
|
ad0d7c |
--- a/keepalived/check/ipwrapper.c
|
|
|
ad0d7c |
+++ b/keepalived/check/ipwrapper.c
|
|
|
ad0d7c |
@@ -649,7 +649,7 @@ migrate_failed_checkers(real_server_t *old_rs, real_server_t *new_rs)
|
|
|
ad0d7c |
continue;
|
|
|
ad0d7c |
for (e1 = LIST_HEAD(l); e1; ELEMENT_NEXT(e1)) {
|
|
|
ad0d7c |
old_c = ELEMENT_DATA(e1);
|
|
|
ad0d7c |
- if (old_c->compare == new_c->compare && new_c->compare(old_c, new_c) == 0) {
|
|
|
ad0d7c |
+ if (old_c->compare == new_c->compare && new_c->compare(old_c, new_c)) {
|
|
|
ad0d7c |
if (svr_checker_up(old_c->id, old_rs) == 0) {
|
|
|
ad0d7c |
id = (checker_id_t *) MALLOC(sizeof(checker_id_t));
|
|
|
ad0d7c |
*id = new_c->id;
|
|
|
ad0d7c |
--
|
|
|
ad0d7c |
2.21.0
|
|
|
ad0d7c |
|