diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-28 01:42:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-10-28 01:42:13 +0100 |
commit | fa1b91632c5220e6589007af4cd573ca909f915a (patch) | |
tree | 1fb3c2e97ef5d3072f7a7c56a2b7cd473d4d3498 /src/core/manager.c | |
parent | cea358fe1b600c40670da96e62c9187f0a7c2bed (diff) |
core: remove system start timeout logic again
The system start timeout as previously implemented would get confused by
long-running services that are included in the initial system startup
transaction for example by being cron-job-like long-running services
triggered immediately at boot. Such long-running jobs would be subject
to the default 15min timeout, esily triggering it.
Hence, remove this again. In a subsequent commit, introduce per-target
job timeouts instead, that allow us to control these timeouts more
finegrained.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index b790d18bbe..70917891b9 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -459,8 +459,6 @@ int manager_new(SystemdRunningAs running_as, bool test_run, Manager **_m) { m->running_as = running_as; m->exit_code = _MANAGER_EXIT_CODE_INVALID; m->default_timer_accuracy_usec = USEC_PER_MINUTE; - m->start_timeout_usec = DEFAULT_MANAGER_START_TIMEOUT_USEC; - m->start_timeout_action = FAILURE_ACTION_POWEROFF_FORCE; m->idle_pipe[0] = m->idle_pipe[1] = m->idle_pipe[2] = m->idle_pipe[3] = -1; @@ -863,9 +861,6 @@ void manager_free(Manager *m) { manager_close_idle_pipe(m); - sd_event_source_unref(m->start_timeout_event_source); - free(m->start_timeout_reboot_arg); - udev_unref(m->udev); sd_event_unref(m->event); @@ -1013,20 +1008,6 @@ static int manager_distribute_fds(Manager *m, FDSet *fds) { return 0; } -static int on_start_timeout(sd_event_source *s, usec_t usec, void *userdata) { - Manager *m = userdata; - - assert(s); - assert(m); - - m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source); - - log_error("Startup timed out."); - - failure_action(m, m->start_timeout_action, m->start_timeout_reboot_arg); - return 0; -} - int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { int r, q; @@ -1099,22 +1080,6 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { m->send_reloading_done = true; } - /* Possibly set up a start timeout */ - if (!dual_timestamp_is_set(&m->finish_timestamp)) { - m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source); - - if (m->start_timeout_usec) { - r = sd_event_add_time( - m->event, - &m->start_timeout_event_source, - CLOCK_MONOTONIC, - now(CLOCK_MONOTONIC) + m->start_timeout_usec, 0, - on_start_timeout, m); - if (r < 0) - log_error("Failed to add start timeout event: %s", strerror(-r)); - } - } - return r; } @@ -2558,8 +2523,6 @@ void manager_check_finished(Manager *m) { dual_timestamp_get(&m->finish_timestamp); - m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source); - if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0) { /* Note that m->kernel_usec.monotonic is always at 0, |