!505 [sync] PR-502: Add succeed info message for ocihook
From: @openeuler-sync-bot Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
ac6ff36360
58
0037-Add-succeed-message-info-for-ocihook.patch
Normal file
58
0037-Add-succeed-message-info-for-ocihook.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 6d265c99fe8daa88b85ce9e9eb9f79741c67901d Mon Sep 17 00:00:00 2001
|
||||||
|
From: jikai <jikai11@huawei.com>
|
||||||
|
Date: Tue, 7 Nov 2023 15:57:55 +0800
|
||||||
|
Subject: [PATCH] Add succeed message info for ocihook
|
||||||
|
|
||||||
|
Signed-off-by: jikai<jikai11@huawei.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
9
lxc.spec
9
lxc.spec
@ -1,4 +1,4 @@
|
|||||||
%global _release 2022102423
|
%global _release 2022102424
|
||||||
|
|
||||||
Name: lxc
|
Name: lxc
|
||||||
Version: 4.0.3
|
Version: 4.0.3
|
||||||
@ -44,6 +44,7 @@ Patch0033: 0033-fix-mount-device-path-incorrect.patch
|
|||||||
Patch0034: 0034-add-secure-compile-macro.patch
|
Patch0034: 0034-add-secure-compile-macro.patch
|
||||||
Patch0035: 0035-codecheck-fix.patch
|
Patch0035: 0035-codecheck-fix.patch
|
||||||
Patch0036: 0036-containers-in-the-FREEZING-state-also-need-to-be-unf.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: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
BuildRequires: pkgconfig(libseccomp)
|
||||||
@ -230,6 +231,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 7 2023 jikai<jikai11@huawei.com> - 4.0.3-2022102424
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: Add succeed message info for ocihook
|
||||||
|
|
||||||
* Mon Sep 11 2023 zhongtao<zhongtao17@huawei.com> - 4.0.3-2022102423
|
* Mon Sep 11 2023 zhongtao<zhongtao17@huawei.com> - 4.0.3-2022102423
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user