[SSSD] [PRELIMINARY][PATCHES] Primary server support in SSSD

Jan Zelený jzeleny at redhat.com
Fri Jun 8 10:56:57 UTC 2012


Hi everybody,
I'm sending some patches which implement the primary server support as I see 
it. It it based on comment #6 in the related ticket 
https://fedorahosted.org/sssd/ticket/1128


Patch #0001 basically adds the necessary support in failover code
Patches #0002 - #0004 extend this support in each provider
Patch #0005 documents the new concept in failover section in man pages
Patches #0006 - #0008 add new options for each provider which utilize this 
concept.


Just briefly about the approach. When adding a new server to the list of 
servers related to a service, each server can be marked either as primary or 
secondary.

When selecting new server from failover list, the algorithm iterates over the 
list twice - first it tries to look for primary server and if none is found, it 
tries also secondary server.

If a server is returned from failover, and it is not primary server, a timeout 
is set (currently hard-coded for 30 seconds) for primary server lookup. This 
timeout is rescheduled until a primary server is found. If a primary server 
(either working or neutral) is found after this timeout, status of the backend 
is reset, i.e. first all offline and then all online callbacks are called. This 
is done to interrupt connection to the secondary server in favor of new 
connection to a primary server.

I have just couple concerns about things which I have yet to inspect. First of 
all when connection to the old server is interrupted, what if an operation is 
currently in progress on this connection? I know ticket #1027 induces similar 
scenario. Maybe to kill two birds with one stone I could design an extension 
to immediately invoke callbacks of all operations running on existing 
connection. What do you think about that?

My second concern is about port status timeout. After some time a port is 
marked as neutral if originally marked as not-working. That effectively leads 
to second attempt to primary server reconnection being successful even though 
the server is still not running. As a result, an unnecessary reconnection to 
secondary server is performed once some data are needed from the server.

Thank you very much for your opinions on this
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Primary-server-support-basic-support-in-failover-cod.patch
Type: text/x-patch
Size: 23446 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Primary-server-support-IPA-adaptation.patch
Type: text/x-patch
Size: 6348 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Primary-server-support-krb5-adaptation.patch
Type: text/x-patch
Size: 9837 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Primary-server-support-LDAP-adaptation.patch
Type: text/x-patch
Size: 6858 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Primary-server-support-man-page-failover-section.patch
Type: text/x-patch
Size: 1773 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Primary-server-support-new-option-in-ldap-provider.patch
Type: text/x-patch
Size: 8513 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Primary-server-support-new-options-in-krb5-provider.patch
Type: text/x-patch
Size: 12296 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Primary-server-support-new-option-in-IPA-provider.patch
Type: text/x-patch
Size: 5079 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120608/f31842f7/attachment.sig>


More information about the sssd-devel mailing list