summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-06-18 13:01:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-21 10:00:46 +0200
commit5e0da22f4dcc7157233e0dd4efc67bc7d217f163 (patch)
tree5de808bebb52e2c4f64d819931acd3e76134f343 /src
parentd12a07608a321f211a74643df7db9bcef76e2ca6 (diff)
downloadsssd-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
Diffstat (limited to 'src')
-rw-r--r--src/providers/fail_over.c7
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;