diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-12-17 12:04:54 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-18 19:45:38 +0100 |
commit | 024e7bb71b9bd08ca2ff00f7fde05488b08f9220 (patch) | |
tree | c1fc35773622c35ad02604421b105638fe9f3c1f /src/providers/fail_over.c | |
parent | 34029fb3030e20a546f5d3a84c194dbe137fb912 (diff) | |
download | sssd-024e7bb71b9bd08ca2ff00f7fde05488b08f9220.tar.gz sssd-024e7bb71b9bd08ca2ff00f7fde05488b08f9220.tar.xz sssd-024e7bb71b9bd08ca2ff00f7fde05488b08f9220.zip |
try primary server after retry_timeout + 1 seconds when switching to backup1.9.2-48
https://fedorahosted.org/sssd/ticket/1679
The problem is when we are about to reset the server status, we don't
get through the timeout (30 seconds) because the "switch to primary
server" task is scheduled 30 seconds after fall back to a backup
server. Thus the server status remains "not working" and is resetted
after another 30 seconds.
We need to make sure that the server status is tried after the
timeout period. retry_timeout is currently hardcoded to 30, thus
the change in man page.
Diffstat (limited to 'src/providers/fail_over.c')
-rw-r--r-- | src/providers/fail_over.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index f3bba37f7..e7c44174d 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -1555,6 +1555,15 @@ fo_get_server_hostname_last_change(struct fo_server *server) return server->common->last_status_change.tv_sec; } +time_t fo_get_service_retry_timeout(struct fo_service *svc) +{ + if (svc == NULL || svc->ctx == NULL || svc->ctx->opts == NULL) { + return 0; + } + + return svc->ctx->opts->retry_timeout; +} + void fo_reset_services(struct fo_ctx *fo_ctx) { struct fo_service *service; |