|
|
72e12a |
From 01ff8155baea989c42664985ea939cb93beb31e7 Mon Sep 17 00:00:00 2001
|
|
|
72e12a |
From: Alexey Tikhonov <atikhono@redhat.com>
|
|
|
72e12a |
Date: Fri, 1 Oct 2021 18:01:21 +0200
|
|
|
72e12a |
Subject: [PATCH] MONITOR: reduce logs severity around signalling and
|
|
|
72e12a |
termination of services to avoid useless in those cases backtraces
|
|
|
72e12a |
|
|
|
72e12a |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
72e12a |
---
|
|
|
72e12a |
src/monitor/monitor.c | 18 +++++++++---------
|
|
|
72e12a |
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
72e12a |
|
|
|
72e12a |
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
|
|
|
72e12a |
index 42def7451..b5fee7e7a 100644
|
|
|
72e12a |
--- a/src/monitor/monitor.c
|
|
|
72e12a |
+++ b/src/monitor/monitor.c
|
|
|
72e12a |
@@ -655,7 +655,7 @@ static int service_signal(struct mt_svc *svc,
|
|
|
72e12a |
* order a service to reload that hasn't started
|
|
|
72e12a |
* yet.
|
|
|
72e12a |
*/
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"Could not signal service [%s].\n", svc->name);
|
|
|
72e12a |
return EIO;
|
|
|
72e12a |
}
|
|
|
72e12a |
@@ -684,8 +684,8 @@ static void service_signal_done(struct tevent_req *req)
|
|
|
72e12a |
return;
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
- DEBUG(SSSDBG_FATAL_FAILURE, "Unable to signal service [%d]: %s\n",
|
|
|
72e12a |
- ret, sss_strerror(ret));
|
|
|
72e12a |
+ DEBUG(ret == ENOENT ? SSSDBG_MINOR_FAILURE : SSSDBG_OP_FAILURE,
|
|
|
72e12a |
+ "Unable to signal service [%d]: %s\n", ret, sss_strerror(ret));
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
static int service_signal_dns_reload(struct mt_svc *svc)
|
|
|
72e12a |
@@ -1363,14 +1363,14 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret)
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
killed = false;
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"Terminating [%s][%d]\n", svc->name, svc->pid);
|
|
|
72e12a |
do {
|
|
|
72e12a |
errno = 0;
|
|
|
72e12a |
kret = kill(-svc->pid, SIGTERM);
|
|
|
72e12a |
if (kret < 0) {
|
|
|
72e12a |
error = errno;
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE, "Couldn't kill [%s][%d]: [%s]\n",
|
|
|
72e12a |
+ DEBUG(SSSDBG_MINOR_FAILURE, "Couldn't terminate [%s][%d]: [%s]\n",
|
|
|
72e12a |
svc->name, svc->pid, strerror(error));
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
@@ -1384,7 +1384,7 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret)
|
|
|
72e12a |
if (error == ECHILD) {
|
|
|
72e12a |
killed = true;
|
|
|
72e12a |
} else if (error != EINTR) {
|
|
|
72e12a |
- DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"[%d][%s] while waiting for [%s]\n",
|
|
|
72e12a |
error, strerror(error), svc->name);
|
|
|
72e12a |
/* Forcibly kill this child */
|
|
|
72e12a |
@@ -1394,13 +1394,13 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret)
|
|
|
72e12a |
} else if (pid != 0) {
|
|
|
72e12a |
error = 0;
|
|
|
72e12a |
if (WIFEXITED(status)) {
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"Child [%s] exited gracefully\n", svc->name);
|
|
|
72e12a |
} else if (WIFSIGNALED(status)) {
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"Child [%s] terminated with a signal\n", svc->name);
|
|
|
72e12a |
} else {
|
|
|
72e12a |
- DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
72e12a |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
72e12a |
"Child [%s] did not exit cleanly\n", svc->name);
|
|
|
72e12a |
/* Forcibly kill this child */
|
|
|
72e12a |
kill(-svc->pid, SIGKILL);
|
|
|
72e12a |
--
|
|
|
72e12a |
2.26.3
|
|
|
72e12a |
|