diff --git a/0037-Add-succeed-message-info-for-ocihook.patch b/0037-Add-succeed-message-info-for-ocihook.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a6d491b4132314fd0eaf004c967d5e973261ef3 --- /dev/null +++ b/0037-Add-succeed-message-info-for-ocihook.patch @@ -0,0 +1,58 @@ +From 6d265c99fe8daa88b85ce9e9eb9f79741c67901d Mon Sep 17 00:00:00 2001 +From: jikai +Date: Tue, 7 Nov 2023 15:57:55 +0800 +Subject: [PATCH] Add succeed message info for ocihook + +Signed-off-by: jikai +--- + src/lxc/conf.c | 5 +++-- + src/lxc/start.c | 4 ++-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index 3e31691..8cb00cd 100644 +--- a/src/lxc/conf.c ++++ b/src/lxc/conf.c +@@ -6513,13 +6513,13 @@ static int run_ocihook_buffer(struct oci_hook_conf *oconf, const char *inmsg) + conf->pid = f->child_pid; + conf->startat = lxc_get_process_startat(conf->pid); + +- INFO("hook_conf timeout %d", oconf->ocihook->timeout); + if(oconf->ocihook->timeout > 0) + conf->timeout = oconf->ocihook->timeout; + else { + conf->timeout = 30; +- INFO("Set hook timeout 30s"); + } ++ INFO("start running hook: %s with hook_conf timeout %d", buffer, conf->timeout); ++ + conf->errfd = oconf->errfd; + conf->which = oconf->which; + +@@ -6560,6 +6560,7 @@ static int run_ocihook_buffer(struct oci_hook_conf *oconf, const char *inmsg) + goto print_hook; + } + ++ INFO("succeed running hook: %s with hook_conf timeout: %d", buffer, conf->timeout); + return 0; + + on_error: +diff --git a/src/lxc/start.c b/src/lxc/start.c +index 5de444d..ec64546 100644 +--- a/src/lxc/start.c ++++ b/src/lxc/start.c +@@ -280,9 +280,9 @@ restart: + #endif + if (closeall) { + if (close(fd)) +- SYSINFO("Closed inherited fd %d", fd); ++ SYSDEBUG("Closed inherited fd %d", fd); + else +- INFO("Closed inherited fd %d", fd); ++ DEBUG("Closed inherited fd %d", fd); + closedir(dir); + goto restart; + } +-- +2.33.0 + diff --git a/lxc.spec b/lxc.spec index 998775bd1e8b693774e841df471095e00b4eaeed..c5bd21682140ae27cddf73f80b0badc98c547d2d 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102423 +%global _release 2022102424 Name: lxc Version: 4.0.3 @@ -44,6 +44,7 @@ Patch0033: 0033-fix-mount-device-path-incorrect.patch Patch0034: 0034-add-secure-compile-macro.patch Patch0035: 0035-codecheck-fix.patch Patch0036: 0036-containers-in-the-FREEZING-state-also-need-to-be-unf.patch +Patch0037: 0037-Add-succeed-message-info-for-ocihook.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -230,6 +231,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name} %endif %changelog +* Tue Nov 7 2023 jikai - 4.0.3-2022102424 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: Add succeed message info for ocihook + * Mon Sep 11 2023 zhongtao - 4.0.3-2022102423 - Type:bugfix - ID:NA