summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-27 20:03:27 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:45:47 -0500
commit41aef6fc747a3b5b8bf47faa468881be16509c66 (patch)
treec4e06319305acddccec0aae4d57ca2c012389041 /src
parenta2db1d6b3f0a6ef52bb5cb5cef40f2de5db380e5 (diff)
core/service: tweak messages on operation timeouts
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 8097e26b0..eb9cd234a 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -3181,19 +3181,21 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
case SERVICE_START_PRE:
case SERVICE_START:
log_warning_unit(UNIT(s)->id,
- "%s operation timed out. Terminating.", UNIT(s)->id);
+ "%s %s operation timed out. Terminating.",
+ UNIT(s)->id,
+ s->state == SERVICE_START ? "start" : "start-pre");
service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_TIMEOUT);
break;
case SERVICE_START_POST:
log_warning_unit(UNIT(s)->id,
- "%s operation timed out. Stopping.", UNIT(s)->id);
+ "%s start-post operation timed out. Stopping.", UNIT(s)->id);
service_enter_stop(s, SERVICE_FAILURE_TIMEOUT);
break;
case SERVICE_RELOAD:
log_warning_unit(UNIT(s)->id,
- "%s operation timed out. Stopping.", UNIT(s)->id);
+ "%s reload operation timed out. Stopping.", UNIT(s)->id);
s->reload_result = SERVICE_FAILURE_TIMEOUT;
service_enter_running(s, SERVICE_SUCCESS);
break;
@@ -3207,11 +3209,11 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
case SERVICE_STOP_SIGTERM:
if (s->kill_context.send_sigkill) {
log_warning_unit(UNIT(s)->id,
- "%s stopping timed out. Killing.", UNIT(s)->id);
+ "%s stop-sigterm timed out. Killing.", UNIT(s)->id);
service_enter_signal(s, SERVICE_STOP_SIGKILL, SERVICE_FAILURE_TIMEOUT);
} else {
log_warning_unit(UNIT(s)->id,
- "%s stopping timed out. Skipping SIGKILL.", UNIT(s)->id);
+ "%s stop-sigterm timed out. Skipping SIGKILL.", UNIT(s)->id);
service_enter_stop_post(s, SERVICE_FAILURE_TIMEOUT);
}
@@ -3229,18 +3231,18 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
case SERVICE_STOP_POST:
log_warning_unit(UNIT(s)->id,
- "%s stopping timed out (2). Terminating.", UNIT(s)->id);
+ "%s stop-post timed out. Terminating.", UNIT(s)->id);
service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_TIMEOUT);
break;
case SERVICE_FINAL_SIGTERM:
if (s->kill_context.send_sigkill) {
log_warning_unit(UNIT(s)->id,
- "%s stopping timed out (2). Killing.", UNIT(s)->id);
+ "%s stop-final-sigterm timed out. Killing.", UNIT(s)->id);
service_enter_signal(s, SERVICE_FINAL_SIGKILL, SERVICE_FAILURE_TIMEOUT);
} else {
log_warning_unit(UNIT(s)->id,
- "%s stopping timed out (2). Skipping SIGKILL. Entering failed mode.",
+ "%s stop-final-sigterm timed out. Skipping SIGKILL. Entering failed mode.",
UNIT(s)->id);
service_enter_dead(s, SERVICE_FAILURE_TIMEOUT, false);
}
@@ -3249,7 +3251,7 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
case SERVICE_FINAL_SIGKILL:
log_warning_unit(UNIT(s)->id,
- "%s still around after SIGKILL (2). Entering failed mode.", UNIT(s)->id);
+ "%s still around after final SIGKILL. Entering failed mode.", UNIT(s)->id);
service_enter_dead(s, SERVICE_FAILURE_TIMEOUT, true);
break;