summaryrefslogtreecommitdiffstats
path: root/src/providers/fail_over.c
Commit message (Collapse)AuthorAgeFilesLines
* FO: Return EAGAIN if there are more servers to tryJakub Hrozek2012-08-151-0/+9
| | | | | The caller should issue a next request, which would just shortcut with ENOENT.
* FO: Don't retry the same server if it's not workingJakub Hrozek2012-08-151-2/+3
|
* Duplicate detection in fail over did not work.Michal Zidek2012-08-151-3/+27
| | | | https://fedorahosted.org/sssd/ticket/1472
* Don't use server after SRV data collapsedJakub Hrozek2012-08-091-5/+8
|
* Always mark SRV servers as primaryJakub Hrozek2012-08-071-0/+1
| | | | https://fedorahosted.org/sssd/ticket/1459
* Failover: Return last tried server if it's still being triedJakub Hrozek2012-08-071-2/+6
| | | | | | | | | | | | | | | | | In the failover, we treat both KDC and LDAP on the IPA server as a single "port", numbered 0. This was done in order to make sure that the SSSD always talks to the same server for both LDAP and Kerberos. However, this clever hack breaks when the IPA provider needs to establish an GSSAPI encrypted LDAP connection because we're asking the fail over code to yield a server while no server has yet been marked as tried. This triggers a fail over for the KDC, so in effect, the TGT is received from second server. If the second server is not available for some reason, the whole provider goes offline. The fail over needs to detect that the server asked for is still being resolved and return the same pointer.
* Don't call fo_set_{server,port}_status for SRV serversJakub Hrozek2012-08-031-2/+3
| | | | This bug was producing harmless, but annoying error messages.
* Primary server support: basic support in failover codeJan Zeleny2012-08-011-15/+60
| | | | | | | | Now there are two list of servers for each service. If currently selected server is only backup, then an event will be scheduled which tries to get connection to one of primary servers and if it succeeds, it starts using this server instead of the one which is currently connected to.
* Move some debug lines to new debug log levelsStef Walter2012-06-201-6/+6
| | | | | | | * These are common lines of debug output when starting up sssd https://bugzilla.redhat.com/show_bug.cgi?id=811113
* Return correct resolv_status on resolver timeoutJakub Hrozek2012-03-291-11/+11
| | | | https://fedorahosted.org/sssd/ticket/1274
* Only do one cycle when resolving a serverJakub Hrozek2012-03-061-0/+7
| | | | https://fedorahosted.org/sssd/ticket/1214
* Failover: Introduce a per-service timeoutJakub Hrozek2011-12-201-0/+46
| | | | https://fedorahosted.org/sssd/ticket/976
* Do not touch resolve_service_state in fo_resolve_service_doneJakub Hrozek2011-12-201-14/+11
|
* Multiline macro cleanupJakub Hrozek2011-09-281-1/+2
| | | | | | | | | | This is mostly a cosmetic patch. The purpose of wrapping a multi-line macro in a do { } while(0) is to make the macro usable as a regular statement, not a compound statement. When the while(0) is terminated with a semicolon, the do { } while(0); block becomes a compound statement again.
* fo_get_server_name() getter for a server nameJakub Hrozek2011-07-211-0/+9
| | | | | Allows to be more concise in tests and more defensive in resolve callbacks
* Rename fo_get_server_name to fo_get_server_str_nameJakub Hrozek2011-07-211-1/+1
|
* Switch resolver to using resolv_hostent and honor TTLJakub Hrozek2011-06-151-18/+18
|
* Fix minor typo in error messageStephen Gallagher2011-05-021-1/+1
| | | | https://fedorahosted.org/sssd/ticket/825
* Set same status for duplicate serversJakub Hrozek2011-04-151-0/+21
|
* Remove detection of duplicates from SRV result processingJakub Hrozek2011-04-111-9/+0
|
* Do not attempt to resolve nameless serversJakub Hrozek2011-04-011-1/+1
| | | | | | | | | | | The failover code is not strictly in charge of resolving. Its main function is to provide a server to connect to for a service. It is legal, although not currently used, to have a server that has no name (server->common == NULL). In this case, no resolving should be done and it is assumed that the failover user, which are the SSSD back ends in our case, would perform any resolving out of band, perhaps using the user_data attribute of fo_server structure.
* Run callbacks if server IP changesJakub Hrozek2011-03-091-0/+9
|
* Always expire host name resolutionJakub Hrozek2011-03-081-8/+7
| | | | | | The previous version of the patch only expired a resolved host name if the port was being reset. We want to always expire it so we notice IP address changes even if the previous server is still up.
* Prevent segfault in failover codeJakub Hrozek2011-03-071-2/+3
|
* Reset server status after timeoutJakub Hrozek2011-02-281-1/+11
| | | | https://fedorahosted.org/sssd/ticket/809
* Rename dns_domain to discovery domain for fo_add_srv_server()Stephen Gallagher2011-01-211-7/+11
|
* Allow fallback to SSSD domainStephen Gallagher2011-01-211-4/+44
| | | | | | | | | | | | | | | | | | | | | For backwards-compatibility with older versions of the SSSD (such as 1.2.x), we need to be able to have our DNS SRV record lookup be capable of falling back to using the SSSD domain name as the DNS discovery domain. This patch modifies our DNS lookups so that they behave as follows: If dns_discovery_domain is specified, it is considered authoritative. No other discovery domains will be attempted. If dns_discovery_domain is not specified, we first attempt to look up the SRV records using the domain portion of the machine's hostname. If this returns "NOTFOUND", we will try performing an SRV record query using the SSSD domain name as the DNS discovery domain. https://fedorahosted.org/sssd/ticket/754
* Rename SRV_NOT_RESOLVED to SRV_RESOLVE_ERRORSumit Bose2011-01-051-5/+5
|
* Use the right status when resetting service discoverySumit Bose2011-01-051-1/+1
|
* Fix incorrect return value on failure in resolve_get_domain_send()Sumit Bose2010-12-141-0/+1
| | | | https://fedorahosted.org/sssd/ticket/721
* Fix improper NULL check in fo_add_srv_server()Sumit Bose2010-12-141-1/+2
| | | | https://fedorahosted.org/sssd/ticket/717
* Run checks before resetting offline stateSumit Bose2010-12-011-0/+17
| | | | | | | | | | | | Before setting the backend to online during a reset offline request the check_online method if the ID provider is called. If the check_online method returns that the ID provider is still not reachable the backend stays offline. Otherwise the backend is switched to online and the related callbacks are run. Additionally the check online test is called during the res_init request because a change in /etc/resolve.conf might also make a server reachable which was assumed offline before.
* Allow protocol fallback for SRV queriesJakub Hrozek2010-12-011-2/+2
| | | | https://fedorahosted.org/sssd/ticket/691
* fix typo in get_server_status()Sumit Bose2010-11-241-1/+1
|
* Fixed small issue in memory context hierarchyJan Zeleny2010-09-071-1/+1
| | | | | In fail_over.c, there was a small bug causing subrequest to have wrong parent memory context. This patch fixes it.
* Return proper error value when SRV lookup failsJakub Hrozek2010-08-031-1/+1
| | | | Fixes: #587
* Add an interface to try next fail-over server after connection to the active ↵eindenbom2010-07-091-0/+21
| | | | server was unexpectedly dropped.
* Added an interface to query number of configured (and currently resolved ↵eindenbom2010-07-091-0/+13
| | | | through SRV records) failover servers.
* Add dns_discovery_domain optionJakub Hrozek2010-06-301-22/+176
| | | | | | | | | | | | The service discovery used to use the SSSD domain name to perform DNS queries. This is not an optimal solution, for example from the point of view of authconfig. This patch introduces a new option "dns_discovery_domain" that allows to set the domain part of a DNS SRV query. If this option is not set, the default behavior is to use the domain part of the machine's hostname. Fixes: #479
* Fix Incorrect NULL check in get_server_common()Jakub Hrozek2010-06-091-1/+1
| | | | Fixes: #518
* Fix potential NULL dereference in fail_over.cJakub Hrozek2010-06-091-2/+5
| | | | Fixes: #505
* Fix uninitialized variableJakub Hrozek2010-05-031-0/+1
|
* Support SRV servers in failoverJakub Hrozek2010-04-301-51/+509
| | | | | | | | | | | | | | | Adds a new failover API call fo_add_srv_server that allows the caller to specify a server that is later resolved into a list of specific servers using SRV requests. Also adds a new failover option that specifies how often should the servers resolved from SRV query considered valid until we need a refresh. The "real" servers to connect to are returned to the user as usual, using the fo_resolve_service_{send,recv} calls. Make SRV resolution work with c-ares 1.6
* Remove freed server_common entities from listJakub Hrozek2010-04-301-1/+24
|
* Treat server names as case-insensitive in failover codeJakub Hrozek2010-04-261-2/+2
|
* Restrict family lookupsJakub Hrozek2010-02-221-9/+16
| | | | | | | Adds a new option that tells resolver which address family to prefer or use exclusively. Fixes: #404
* Rename server/ directory to src/Stephen Gallagher2010-02-181-0/+651
Also update BUILD.txt