151a6de RESPONDER: Shutdown {dbus,socket}-activated responders in case they're idle

9 files Authored by fidencio 7 years ago, Committed by lslebodn 7 years ago,
    RESPONDER: Shutdown {dbus,socket}-activated responders in case they're idle
    
    This commit introduces a new option for the responders called
    responder_idle_timeout, which specifies the number of seconds that the
    responder process can be up without being used. The default value is
    300 seconds (5 minutes) and can be configured per responder, being 60
    seconds the minimum acceptable value.
    
    Is important to note that setting "responder_idle_timeout = 0" disables
    the responder timeout, which makes sense for the responders that always
    will be running.
    
    The shutdown timeout is activated per responder in case the responder
    has been {dbus,socket}-activated. In case of any commnunication with the
    responder the timeout is reset thereby ensuring we won't shutdown a
    responder that is not idle.
    
    Setting the responder's last request time is done slightly differently
    for socket-activated and dbus-activated responders. In both cases it's
    updated in any internal communication in sbus_message_handler(), but
    for the socket-activated responders it's also updated when the
    responder's socket is used.
    
    Currently it works properly with all responders but the secrets one,
    which has a different logic and must be treated separately in case some
    change is required there.
    
    Is worth to mention that this commit does not affect the responders
    explicitly configured in the "services" line of sssd.conf.
    
    Related:
    https://fedorahosted.org/sssd/ticket/3245
    
    Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
    
        
file modified
+2 -0
file modified
+1 -0
file modified
+7 -0
file modified
+1 -0
file modified
+22 -0
file modified
+62 -1