So, when I tried to fix #302, I first thought the problem was that there was no feedback to mark servers as working, plus I discovered that there are some missing status sets in the fail over code itself. However, the truth was that the problem was much simpler than that, attached patch fixes it. The macro STATUS_DIFF() was wrong causing the result to always be lower than 0, therefore the timeout was never reached.
I'll investigate the other issues I found later, hopefully they will not cause troubles. Martin
>From b1361135d8852e5de2440038718c64f94417e0dc Mon Sep 17 00:00:00 2001 From: Martin Nagy <mn...@redhat.com> Date: Wed, 9 Dec 2009 14:11:09 +0100 Subject: [PATCH] Correctly restart server status after the timeout The macro STATUS_DIFF() was wrong causing the result to always be lower than 0, therefore the timeout was never reached. Fixes: #302 --- server/providers/fail_over.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/providers/fail_over.c b/server/providers/fail_over.c index 8c52032..8288171 100644 --- a/server/providers/fail_over.c +++ b/server/providers/fail_over.c @@ -35,7 +35,7 @@ #include "providers/fail_over.h" #include "resolv/async_resolv.h" -#define STATUS_DIFF(p, tv2) ((p)->last_status_change.tv_sec - (tv2).tv_sec) +#define STATUS_DIFF(p, now) ((now).tv_sec - (p)->last_status_change.tv_sec) #define SERVER_NAME(s) ((s)->common ? (s)->common->name : "(no name)") #define DEFAULT_PORT_STATUS PORT_NEUTRAL -- 1.6.2.5
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel