diff --git a/0024-log-adjust-log-level-from-error-to-warn.patch b/0024-log-adjust-log-level-from-error-to-warn.patch new file mode 100644 index 0000000000000000000000000000000000000000..5a07fcb4edd4f972cd30c2e718c4bc93caac30e5 --- /dev/null +++ b/0024-log-adjust-log-level-from-error-to-warn.patch @@ -0,0 +1,68 @@ +From 7e829529bfd45dfdb26f43d50c1296de3456695f Mon Sep 17 00:00:00 2001 +From: Li Feng +Date: Thu, 13 May 2021 14:57:20 +0800 +Subject: [PATCH] log: adjust log level from error to warn + +Signed-off-by: Li Feng +--- + src/lxc/attach.c | 2 +- + src/lxc/commands.c | 2 +- + src/lxc/terminal.c | 2 +- + src/lxc/tools/lxc_attach.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/lxc/attach.c b/src/lxc/attach.c +index 68f414875..5225e9982 100644 +--- a/src/lxc/attach.c ++++ b/src/lxc/attach.c +@@ -1222,7 +1222,7 @@ static int attach_signal_handler(int fd, uint32_t events, void *data, + info.si_pid = 0; + ret = waitid(P_PID, *pid, &info, WEXITED | WNOWAIT | WNOHANG); + if (ret == 0 && info.si_pid == *pid) { +- return log_error(LXC_MAINLOOP_CLOSE, "Container attach init process %d exited", *pid); ++ return log_warn(LXC_MAINLOOP_CLOSE, "Container attach init process %d exited", *pid); + } + + return LXC_MAINLOOP_CONTINUE; +diff --git a/src/lxc/commands.c b/src/lxc/commands.c +index 70c56579e..b954453c0 100644 +--- a/src/lxc/commands.c ++++ b/src/lxc/commands.c +@@ -1204,7 +1204,7 @@ int lxc_cmd_serve_state_clients(const char *name, const char *lxcpath, + + ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); + if (ret < 0) +- return log_error_errno(-1, errno, "Failed to serve state clients"); ++ return log_warn_errno(-1, errno, "Failed to serve state clients"); + + return 0; + } +diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c +index 1e467f5a6..5d836916e 100644 +--- a/src/lxc/terminal.c ++++ b/src/lxc/terminal.c +@@ -804,7 +804,7 @@ int lxc_terminal_io_cb(int fd, uint32_t events, void *data, + terminal->pipes[0][1] = -EBADF; + return LXC_MAINLOOP_CONTINUE; + } else { +- ERROR("Handler received unexpected file descriptor"); ++ WARN("Handler received unexpected file descriptor"); + } + close(fd); + return LXC_MAINLOOP_CLOSE; +diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c +index 3bfbe6a19..4d69e9448 100644 +--- a/src/lxc/tools/lxc_attach.c ++++ b/src/lxc/tools/lxc_attach.c +@@ -428,7 +428,7 @@ static int do_attach_foreground(struct lxc_container *c, lxc_attach_command_t *c + wexit = EXIT_SIGNAL_OFFSET + signal; + } + +- ERROR("Execd pid %d exit with %d", pid, wexit); ++ WARN("Execd pid %d exit with %d", pid, wexit); + + out: + if (c->lxc_conf->errmsg) { +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 96bb3007cbe6dbb3ca4e69724f10da91c0edb253..0eaca7949f2c5e408774ff09343c37a432ffc8f4 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2021050802 +%global _release 2021051301 Name: lxc Version: 4.0.3 @@ -31,6 +31,7 @@ Patch0020: 0020-support-cgroup-v2.patch Patch0021: 0021-support-isula-exec-workdir.patch Patch0022: 0022-print-error-message-if-process-workdir-failed.patch Patch0023: 0023-log-support-long-syslog-tag.patch +Patch0024: 0024-log-adjust-log-level-from-error-to-warn.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -202,6 +203,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Thu Mar 13 2021 lifeng - 4.0.3-2021051301 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:adjust log level + * Sat Mar 08 2021 haozi007 - 4.0.3-2021050802 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index 959704ddec1cbc234bade6ca16d1fd9b12c4c6a3..7caf5549ac76692f100cb6f599ab0c6aa6adb919 100644 --- a/series.conf +++ b/series.conf @@ -21,3 +21,4 @@ 0021-support-isula-exec-workdir.patch 0022-print-error-message-if-process-workdir-failed.patch 0023-log-support-long-syslog-tag.patch +0024-log-adjust-log-level-from-error-to-warn.patch