From db9dda25e45ca36a90f0d7d1fae02fd4061899cb Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 13 Sep 2022 03:38:13 -0400 Subject: [PATCH] import resource-agents-4.9.0-16.el8_6.2 --- ...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/bz2092262-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch diff --git a/SOURCES/bz2092262-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch b/SOURCES/bz2092262-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch new file mode 100644 index 0000000..7f0c7ef --- /dev/null +++ b/SOURCES/bz2092262-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 6f48dac..ffb71f0 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -66,7 +66,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.9.0 -Release: 16%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 16%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.2 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -101,6 +101,7 @@ Patch14: bz1654862-1-IPsrcaddr-dhcp-warning.patch Patch15: bz1654862-2-IPsrcaddr-error-message-route-not-found.patch Patch16: bz1654862-3-IPsrcaddr-fix-indentation.patch Patch17: bz1654862-4-IPsrcaddr-fixes.patch +Patch18: bz2092262-CTDB-move-process-to-root-cgroup-if-rt-enabled.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -292,6 +293,7 @@ exit 1 %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -872,6 +874,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Fri Aug 5 2022 Oyvind Albrigtsen - 4.9.0-16.2 +- CTDB: move process to root cgroup if realtime scheduling is enabled + + Resolves: rhbz#2092262 + * Thu Mar 3 2022 Oyvind Albrigtsen - 4.9.0-16 - IPsrcaddr: add warning about possible issues when used with DHCP, and add error message when matching route not found