10a6760 Failover: Return last tried server if it's still being tried

Authored and Committed by jhrozek 11 years ago
    Failover: Return last tried server if it's still being tried
    
    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.
    
        
file modified
+6 -2