-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-apps/systemd: add systemd patch from v252.12
If fixes an issue with Systemd service restart when the main process is being killed by a SIGHUP signal. See also: flatcar/Flatcar#1157 Commit-Ref: systemd/systemd-stable@34e834f Signed-off-by: Mathieu Tortuyaux <[email protected]>
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Fixed the restart of Systemd services when the main process is being killed by a SIGHUP signal ([flatcar#1157](https://github.com/flatcar/Flatcar/issues/1157)) |
40 changes: 40 additions & 0 deletions
40
...sys-apps/systemd/files/0008-Revert-core-service-when-resetting-PID-also-reset-known.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 34e834f496338fdc2a8a8cc771cba4082079cf9a Mon Sep 17 00:00:00 2001 | ||
From: msizanoen <[email protected]> | ||
Date: Mon, 12 Jun 2023 10:30:12 +0700 | ||
Subject: [PATCH] Revert "core/service: when resetting PID also reset known | ||
flag" | ||
|
||
This reverts commit ff32060f2ed37b68dc26256b05e2e69013b0ecfe. | ||
|
||
This change is incorrect as we don't want to mark the PID as invalid but | ||
only mark it as dead. | ||
|
||
The change in question also breaks user level socket activation for | ||
`podman.service` as the termination of the main `podman system service` | ||
process is not properly handled, causing any application accessing the | ||
socket to hang. | ||
|
||
This is because the user-level `podman.service` unit also hosts two | ||
non-main processes: `rootlessport` and `rootlessport-child` which causes | ||
the `cgroup_good` check to still succeed. | ||
|
||
The original submitter of this commit is recommended to find another | ||
more correct way to fix the cgroupsv1 issue on CentOS 8. | ||
|
||
(cherry picked from commit f29f0877c5abfd03060838d1812ea6fdff3b0b37) | ||
--- | ||
src/core/service.c | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/src/core/service.c b/src/core/service.c | ||
index c05f13c765..211f72900e 100644 | ||
--- a/src/core/service.c | ||
+++ b/src/core/service.c | ||
@@ -3529,7 +3529,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { | ||
return; | ||
|
||
s->main_pid = 0; | ||
- s->main_pid_known = false; | ||
exec_status_exit(&s->main_exec_status, &s->exec_context, pid, code, status); | ||
|
||
if (s->main_command) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters