From 484a918603e4bba29a5082e24dc5e58fa8d54769 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Thu, 15 Feb 2024 12:25:15 -0500 Subject: [PATCH] Put back patch to run stalld service as initrc_t Resolves: RHEL-8982 Signed-off-by: John Kacur --- Start-stalld-service-as-initrc_t.patch | 31 ++++++++++++++++++++++++++ stalld.spec | 8 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Start-stalld-service-as-initrc_t.patch diff --git a/Start-stalld-service-as-initrc_t.patch b/Start-stalld-service-as-initrc_t.patch new file mode 100644 index 0000000..92b624f --- /dev/null +++ b/Start-stalld-service-as-initrc_t.patch @@ -0,0 +1,31 @@ +From c93cef85e7ec08d924ad6a4f90a8677cc1603950 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 14 Feb 2024 15:55:30 -0500 +Subject: [PATCH] Start stalld service as initrc_t + +Stalld currently runs as an unconfined_service_t. + +Edit to service file so that the daemon is launched as an initrc_t. + +Signed-off-by: Leah Leshchinsky +Signed-off-by: John Kacur +--- + systemd/stalld.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/systemd/stalld.service b/systemd/stalld.service +index d93110b1b43e..69f3ee728129 100644 +--- a/systemd/stalld.service ++++ b/systemd/stalld.service +@@ -10,7 +10,7 @@ ExecStartPre=/usr/bin/throttlectl off + + # In case the regex passed to IT or IP includes C escape sequences, + # use ${IT} or ${IP} instead of $IT or $IP +-ExecStart=/usr/bin/stalld --systemd $CLIST $AGGR $BP $BR $BD $THRESH $LOGGING $FG $PF $IT $IP ++ExecStart=/bin/sh -c "/usr/bin/stalld --systemd $CLIST $AGGR $BP $BR $BD $THRESH $LOGGING $FG $PF $IT $IP" + ExecStopPost=/usr/bin/throttlectl on + CPUSchedulingPolicy=fifo + CPUSchedulingPriority=10 +-- +2.43.0 + diff --git a/stalld.spec b/stalld.spec index f4e2ab6..5cc0f2e 100644 --- a/stalld.spec +++ b/stalld.spec @@ -1,6 +1,6 @@ Name: stalld Version: 1.19.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Daemon that finds starving tasks and gives them a temporary boost License: GPLv2 @@ -23,6 +23,8 @@ BuildRequires: llvm Requires: libbpf %endif +Patch0: Start-stalld-service-as-initrc_t.patch + %description The stalld program monitors the set of system threads, looking for threads that are ready-to-run but have not @@ -60,6 +62,10 @@ allow 10 microseconds of runtime for 1 second of clock time. %systemd_postun_with_restart %{name}.service %changelog +* Wed Feb 14 2024 John Kacur - 1.19.1-4 +- Put back patch to run stalld service as initrc_t +Resolves: RHEL-8982 + * Mon Feb 12 2024 John Kacur - 1.19.1-3 - Copying over missing tests directory Resolves: RHEL-8982