From aca17900b41acc0949498123adf4dfbf2c4159e8 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Tue, 11 Oct 2022 10:59:08 +0800 Subject: [PATCH] skip kill cgroup processes if no hierarchies Signed-off-by: zhangxiaoyu (cherry picked from commit 57e4c072b3f6a44a866f187d053815698f88ae1b) --- ...l-cgroup-processes-if-no-hierarchies.patch | 36 +++++++++++++++++++ lxc.spec | 19 ++++++---- series.conf | 1 + 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 0049-skip-kill-cgroup-processes-if-no-hierarchies.patch diff --git a/0049-skip-kill-cgroup-processes-if-no-hierarchies.patch b/0049-skip-kill-cgroup-processes-if-no-hierarchies.patch new file mode 100644 index 0000000..9538da7 --- /dev/null +++ b/0049-skip-kill-cgroup-processes-if-no-hierarchies.patch @@ -0,0 +1,36 @@ +From 2aa9204b74c96413944a715408cfd5d2f3a34d66 Mon Sep 17 00:00:00 2001 +From: isuladci +Date: Thu, 22 Sep 2022 10:44:26 +0800 +Subject: [PATCH] skip kill cgroup processes if no hierarchies + +Signed-off-by: isuladci +--- + src/lxc/cgroups/isulad_cgfsng.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/lxc/cgroups/isulad_cgfsng.c b/src/lxc/cgroups/isulad_cgfsng.c +index 8a9656a..f5cf81c 100644 +--- a/src/lxc/cgroups/isulad_cgfsng.c ++++ b/src/lxc/cgroups/isulad_cgfsng.c +@@ -677,15 +677,14 @@ __cgfsng_ops static bool isulad_cgfsng_payload_destroy(struct cgroup_ops *ops, + return false; + } + +-#ifdef HAVE_ISULAD + if (ops->no_controller) { +- DEBUG("no controller found, isgnore isulad_cgfsng_payload_destroy"); ++ DEBUG("no controller found, ignore isulad_cgfsng_payload_destroy"); + return true; + } +-#endif + + if (!ops->hierarchies) { +- return false; ++ DEBUG("no hierarchies found, ignore isulad_cgfsng_payload_destroy"); ++ return true; + } + + if (!handler) { +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 04f6683..06a05c3 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022092001 +%global _release 2022101101 Name: lxc Version: 4.0.3 @@ -54,8 +54,9 @@ Patch0043: 0043-do-not-operate-playload-and-attach-cgroup-if-no-cont.patch Patch0044: 0044-fix-HOME-env-unset-error.patch Patch0045: 0045-only-set-user-or-image-set-non-empty-HOME.patch Patch0046: 0046-return-fail-if-no-args-or-no-rootfs-path-found.patch -Patch0047: 0047-fix-tools-with-option-give-error-message.patch -Patch0048: 0048-fix-do-mask-paths-after-parent-mounted.patch +Patch0047: 0047-fix-tools-with-option-give-error-message.patch +Patch0048: 0048-fix-do-mask-paths-after-parent-mounted.patch +Patch0049: 0049-skip-kill-cgroup-processes-if-no-hierarchies.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -227,23 +228,29 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Tue Oct 11 2022 zhangxiaoyu - 4.0.3-2022101101 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: skip kill cgroup processes if no hierarchies + * Tue Sep 20 2022 Neil.wrz - 4.0.3-2022092001 - Type:bugfix - ID:NA - SUG:NA -- DESC: do mask paths after parent mounted +- DESC: do mask paths after parent mounted * Fri Sep 02 2022 Neil.wrz - 4.0.3-2022090201 - Type:bugfix - ID:NA - SUG:NA -- DESC: fix tools using -? option give error +- DESC: fix tools using -? option give error * Wed Aug 31 2022 zhangxiaoyu - 4.0.3-2022083101 - Type:bugfix - ID:NA - SUG:NA -- DESC: return fail if no args or no rootfs path found +- DESC: return fail if no args or no rootfs path founds * Fri Aug 12 2022 haozi007 - 4.0.3-2022081201 - Type:bugfix diff --git a/series.conf b/series.conf index 4b4e5c0..26cd97f 100644 --- a/series.conf +++ b/series.conf @@ -46,3 +46,4 @@ 0046-return-fail-if-no-args-or-no-rootfs-path-found.patch 0047-fix-tools-with-option-give-error-message.patch 0048-fix-do-mask-paths-after-parent-mounted.patch +0049-skip-kill-cgroup-processes-if-no-hierarchies.patch -- Gitee