[SSSD] [PATCHES] fix SRV expansion

Pavel Březina pbrezina at redhat.com
Tue Jun 18 11:51:15 UTC 2013


https://fedorahosted.org/sssd/ticket/1947

A fast explanation how _srv_ expansion works. _srv_ is inserted into 
server list as so called meta server. Let us consider following 
configuration:

*Setup*
ipa_server = _srv_, ipa.pb
server list will contain: meta -> ipa.pb

*Expansion*
meta -> ipa.pb:389 -> ipa.pb ; remove meta
ipa.pb:389 -> ipa.pb ; meta

*Collapse*
remove ipa.pb:389 ; insert meta
meta -> ipa.pb

The main problem is that expanded SRV servers are marked as NEUTRAL 
during online check, but they don't collapse back into a meta server.

This will trigger another SRV expansion, leaving the old server in the 
list and trying to add the servers again. This is present in both master 
and 1.9 (and probably older versions), although the result is slightly 
different.

In master, we don't insert a server into server list if it is already 
present. Because state->meta is orphaned from the previous SRV 
expansion, state->meta->next is NULL and SSSD crashes later.

In 1.9, we simply insert duplicate servers. Those servers are inserted 
after orphaned state->meta, state->meta is orphaned again, leaving those 
servers globally unreachable. However, it seemingly does not affect the 
fail over. You just run into d25e7c65.

Here are four patches for master, and two patches for 1.9.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-9-0001-collapse_srv_lookup-may-free-the-server-make-it-clea.patch
Type: text/x-patch
Size: 2740 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-9-0002-failover-if-expanded-server-is-marked-as-neutral-inv.patch
Type: text/x-patch
Size: 1528 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master-0001-failover-do-not-return-invalid-pointer-when-server-i.patch
Type: text/x-patch
Size: 1620 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master-0002-failover-return-error-when-SRV-lookup-returned-only-.patch
Type: text/x-patch
Size: 3869 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master-0003-collapse_srv_lookup-may-free-the-server-make-it-clea.patch
Type: text/x-patch
Size: 2370 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master-0004-failover-if-expanded-server-is-marked-as-neutral-inv.patch
Type: text/x-patch
Size: 1544 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130618/79102865/attachment-0005.bin>


More information about the sssd-devel mailing list