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