diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-06-18 13:01:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-21 10:00:46 +0200 |
commit | 5e0da22f4dcc7157233e0dd4efc67bc7d217f163 (patch) | |
tree | 5de808bebb52e2c4f64d819931acd3e76134f343 | |
parent | d12a07608a321f211a74643df7db9bcef76e2ca6 (diff) | |
download | sssd-5e0da22f4dcc7157233e0dd4efc67bc7d217f163.tar.gz sssd-5e0da22f4dcc7157233e0dd4efc67bc7d217f163.tar.bz2 sssd-5e0da22f4dcc7157233e0dd4efc67bc7d217f163.zip |
failover: if expanded server is marked as neutral, invoke srv collapse
https://fedorahosted.org/sssd/ticket/1947
Otherwise we will do the SRV expansion once again:
1. leaving the old servers in server list
2. meta server is not inserted back in the list, the newly found
servers are inserted behind meta server, meta server is orphaned
and the new servers are forgotten
-rw-r--r-- | src/providers/fail_over.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index 46caaea4..fdc42dec 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -1198,6 +1198,13 @@ resolve_srv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, * query collapsed * */ case SRV_NEUTRAL: /* Request SRV lookup */ + if (server != NULL && server != state->meta) { + /* A server created by expansion of meta server was marked as + * neutral. We have to collapse the servers and issue new + * SRV resolution. */ + state->meta = collapse_srv_lookup(&server); + } + if (ctx->srv_send_fn == NULL || ctx->srv_recv_fn == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("No SRV lookup plugin is set\n")); ret = ENOTSUP; |