diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2017-02-05 01:55:56 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2017-02-10 16:47:47 +0100 |
commit | 00c0b7bc6969d31deab9e8e7541b4a6483b78b3e (patch) | |
tree | d9caf8afe1892c40f69d44a7768842ccfdfac7e1 /src/monitor | |
parent | 040ade7b2e11fecf615aedf58592cc7245900e86 (diff) | |
download | sssd-00c0b7bc6969d31deab9e8e7541b4a6483b78b3e.tar.gz sssd-00c0b7bc6969d31deab9e8e7541b4a6483b78b3e.tar.xz sssd-00c0b7bc6969d31deab9e8e7541b4a6483b78b3e.zip |
MONITOR: Don't timeout if using local provider + socket-activated responders
When using only the local provider with socket-activated services SSSD
ends up never notifying systemd its startup has been done, as notifying
systemd is done *only* when a service (provider or responder) is started
up, leading SSSD's startup to fail due to a timeout.
So, in order to avoid this situation, let's just notify the startup
earlier in case we have *only* socket-activated services and the *only*
provider set up is the LOCAL one.
Resolves:
https://fedorahosted.org/sssd/ticket/3299
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/monitor')
-rw-r--r-- | src/monitor/monitor.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index f55a89edc..1fa3d4baf 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2403,6 +2403,15 @@ static int monitor_process_init(struct mt_ctx *ctx, } } + /* When the only provider set up is the local one (num_providers == 0) and + * there's no responder explicitly set up it means that we should notify + * systemd that SSSD is ready right now as any other provider/responder + * would be able to do so and the SSSD would end up hitting a systemd + * timeout! */ + if (num_providers == 0 && ctx->services == NULL) { + ret = notify_startup(); + } + return EOK; } |