5490fa3 failover: set port status to not working if previous srv lookup failed

1 file Authored by pbrezina 9 years ago, Committed by jhrozek 9 years ago,
    failover: set port status to not working if previous srv lookup failed
    
    The meta server status consists of two parts:
    A) port status - managed by failover mechanism
    B) SRV lookup status - managed by SRV resolver
    
    Both parts are resetted to "neutral" after some time, having
    B timeout greater than A timeout.
    
    We were hitting the following issue:
    1. SRV lookup fails (DNS is not reachable), this will set A to
    "not working and B to "resolve error". Then the next server is
    tried but fails as well.
    
    2. If SSSD tries to go back online the failover will set A to
    "neutral" and it will try to resolve SRV again. But B status is
    still set to "resolve error" since we haven't reached the timeout
    yet and SRV resolution fails immediately. But the next server
    is not tried since the port status (A) remains "neutral".
    
    This patch sets the port status to "not working" making the
    failover to continue with the next server as expected.
    
    https://fedorahosted.org/sssd/ticket/2390
    
    Reviewed-by: Pavel Reichl <preichl@redhat.com>
    Reviewed-by: Simo Sorce <simo@redhat.com>
    
        
file modified
+5 -0