!146 lxc: adjust log level
From: @lifeng2221dd1 Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
709095931b
68
0024-log-adjust-log-level-from-error-to-warn.patch
Normal file
68
0024-log-adjust-log-level-from-error-to-warn.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From 7e829529bfd45dfdb26f43d50c1296de3456695f Mon Sep 17 00:00:00 2001
|
||||
From: Li Feng <lifeng2221dd1@zoho.com.cn>
|
||||
Date: Thu, 13 May 2021 14:57:20 +0800
|
||||
Subject: [PATCH] log: adjust log level from error to warn
|
||||
|
||||
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
|
||||
---
|
||||
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
|
||||
|
||||
9
lxc.spec
9
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 <lifeng68@huawei.com> - 4.0.3-2021051301
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:adjust log level
|
||||
|
||||
* Sat Mar 08 2021 haozi007 <liuhao27@huawei.com> - 4.0.3-2021050802
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user