systemd/SOURCES/0234-unit-In-cgroupv1-gracefully-terminate-delegated-scop.patch

39 lines
1.5 KiB
Diff
Raw Normal View History

2023-11-07 11:29:40 +00:00
From 25223b64f043d9b78d1f70ee7e4a2a3b7a579a84 Mon Sep 17 00:00:00 2001
2023-05-09 05:39:14 +00:00
From: Jan Macku <jamacku@redhat.com>
Date: Fri, 17 Mar 2023 14:00:15 +0100
Subject: [PATCH] unit: In cgroupv1, gracefully terminate delegated scopes
again
Instantly killing delegated scopes is just not viable for our
needs in OCP 4.13 in cgroupv1 mode. We will accept the possibility
of timeouts instead.
Co-authored-by: Colin Walters <walters@verbum.org>
rhel-only
2023-11-07 11:29:40 +00:00
Resolves: #2180120
2023-05-09 05:39:14 +00:00
---
src/core/unit.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/core/unit.c b/src/core/unit.c
index c319e99d71..0d1a590a3f 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -4616,8 +4616,13 @@ int unit_kill_context(
* however should not exist in non-delegated units. On the unified hierarchy that's different,
* there we get proper events. Hence rely on them. */
+ /* (RHEL9): we patch out a check for delegation here that exists upstream
+ * and accept a possible delayed shutdown due to races in favor of
+ * not just insta-killing the processes.
+ */
+
if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0 ||
- (detect_container() == 0 && !unit_cgroup_delegate(u)))
+ (detect_container() == 0))
wait_for_exit = true;
if (send_sighup) {