Skip to content

Commit

Permalink
MONITOR: quit if any of providers didn't start
Browse files Browse the repository at this point in the history
This more or less cosmetic change in the sense that currently
this code / condition shouldn't be reachable (see comment in the
patch).
  • Loading branch information
alexey-tikhonov committed May 9, 2024
1 parent a688abd commit 552ae84
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/monitor/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +514,13 @@ static void services_startup_timeout(struct tevent_context *ev,
DEBUG(SSSDBG_TRACE_FUNC, "Handling timeout\n");

if (!ctx->services_started) {

DEBUG(SSSDBG_CRIT_FAILURE, "Providers did not start in time, "
"forcing services startup!\n");

ctx->services_started = true;

DEBUG(SSSDBG_CONF_SETTINGS, "Now starting services!\n");
/* then start all services */
for (i = 0; ctx->services[i]; i++) {
add_new_service(ctx, ctx->services[i], 0);
}
/* This code is more a sanity guard: if any of providers
* didn't start to this moment (MONITOR_MAX_SVC_RESTARTS),
* `monitor_restart_service()` should already have process
* terminated anyway.
*/
DEBUG(SSSDBG_CRIT_FAILURE, "Providers did not start in time!\n");
monitor_quit(mt_ctx, 1);
}
}

Expand Down

0 comments on commit 552ae84

Please sign in to comment.