From 8393e05f24d44675e0ea9d88b6e3c321fe3be06f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 6 Aug 2022 10:12:05 +0000 Subject: [PATCH] import resource-agents-4.9.0-28.el8 --- ...process-to-root-cgroup-if-rt-enabled.patch | 47 +++++++++++++++++++ SPECS/resource-agents.spec | 9 +++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 SOURCES/bz2090370-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch diff --git a/SOURCES/bz2090370-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch b/SOURCES/bz2090370-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch new file mode 100644 index 0000000..7f0c7ef --- /dev/null +++ b/SOURCES/bz2090370-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch @@ -0,0 +1,47 @@ +From 99c4f2af92a10155cf072198c72deffaed3883a5 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Wed, 3 Aug 2022 17:20:31 +0200 +Subject: [PATCH] CTDB: move process to root cgroup if realtime scheduling is + enabled + +--- + heartbeat/CTDB.in | 2 ++ + heartbeat/ocf-shellfuncs.in | 12 ++++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/heartbeat/CTDB.in b/heartbeat/CTDB.in +index d25d026ca..46f56cfac 100755 +--- a/heartbeat/CTDB.in ++++ b/heartbeat/CTDB.in +@@ -709,6 +709,8 @@ EOF + invoke_ctdbd() { + local vers="$1" + ++ ocf_move_to_root_cgroup_if_rt_enabled ++ + ocf_version_cmp "$vers" "4.9.0" + if [ "$?" -ne "0" ]; then + # With 4.9+, all ctdbd binary parameters are provided as +diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in +index 6be4e4e30..2c53a967a 100644 +--- a/heartbeat/ocf-shellfuncs.in ++++ b/heartbeat/ocf-shellfuncs.in +@@ -672,6 +672,18 @@ EOF + systemctl daemon-reload + } + ++# move process to root cgroup if realtime scheduling is enabled ++ocf_move_to_root_cgroup_if_rt_enabled() ++{ ++ if [ -e "/sys/fs/cgroup/cpu/cpu.rt_runtime_us" ]; then ++ echo $$ >> /sys/fs/cgroup/cpu/tasks ++ ++ if [ "$?" -ne "0" ]; then ++ ocf_log warn "Unable to move PID $$ to the root cgroup" ++ fi ++ fi ++} ++ + # usage: crm_mon_no_validation args... + # run crm_mon without any cib schema validation + # This is useful when an agent runs in a bundle to avoid potential diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 8c44a40..ebe95e2 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -69,7 +69,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 27%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 28%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -118,6 +118,7 @@ Patch26: bz1908146-bz1908147-bz1908148-bz1949114-openstack-agents-warn-when-open Patch27: bz2103370-ocf-tester-1-update.patch Patch28: bz2103370-ocf-tester-2-remove-deprecated-lrmd-lrmadmin-code.patch Patch29: bz1908146-bz1908147-bz1908148-bz1949114-openstack-agents-set-domain-parameters-default.patch +Patch30: bz2090370-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -327,6 +328,7 @@ exit 1 %patch27 -p1 %patch28 -p1 %patch29 -p1 +%patch30 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -902,6 +904,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Thu Aug 4 2022 Oyvind Albrigtsen - 4.9.0-28 +- CTDB: move process to root cgroup if realtime scheduling is enabled + + Resolves: rhbz#2090370 + * Thu Jul 14 2022 Oyvind Albrigtsen - 4.9.0-27 - ocf-tester: add testing tool