diff --git a/0001-Add-the-parameter-of-dampening-and-fix-attrd_updater.patch b/0001-Add-the-parameter-of-dampening-and-fix-attrd_updater.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd864d7d84c255ab41e9d43b3c983c153c064e49 --- /dev/null +++ b/0001-Add-the-parameter-of-dampening-and-fix-attrd_updater.patch @@ -0,0 +1,62 @@ +From 92d5801b36408c3e6af561ecb546df0641212b4a Mon Sep 17 00:00:00 2001 +From: liupei +Date: Wed, 23 Aug 2023 11:28:38 +0800 +Subject: [PATCH] Add the parameter of dampening and fix attrd_updater command + +--- + agents/ocf/HealthCPU.in | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/agents/ocf/HealthCPU.in b/agents/ocf/HealthCPU.in +index 4a8e7c3..a852a7a 100644 +--- a/agents/ocf/HealthCPU.in ++++ b/agents/ocf/HealthCPU.in +@@ -67,6 +67,15 @@ the #health-cpu will go red if the %idle of the CPU falls below 10%. + + + ++ ++ ++The time to wait (dampening) in seconds for further changes before writing ++ ++The time to wait (dampening) in seconds for further changes ++before writing ++ ++ ++ + + + +@@ -117,16 +126,16 @@ healthcpu_monitor() { + + if [ $IDLE -lt ${OCF_RESKEY_red_limit} ] ; then + # echo "System state RED!" +- attrd_updater -n "#health-cpu" -U "red" -d "30s" ++ attrd_updater -n "#health-cpu" -B "red" -d ${OCF_RESKEY_dampening} + return $OCF_SUCCESS + fi + + if [ $IDLE -lt ${OCF_RESKEY_yellow_limit} ] ; then + # echo "System state yellow." +- attrd_updater -n "#health-cpu" -U "yellow" -d "30s" ++ attrd_updater -n "#health-cpu" -B "yellow" -d ${OCF_RESKEY_dampening} + else + # echo "System state green." +- attrd_updater -n "#health-cpu" -U "green" -d "30s" ++ attrd_updater -n "#health-cpu" -B "green" -d ${OCF_RESKEY_dampening} + fi + + return $OCF_SUCCESS +@@ -188,6 +197,9 @@ fi + if [ -z "${OCF_RESKEY_yellow_limit}" ] ; then + OCF_RESKEY_yellow_limit=50 + fi ++if [ -z "${OCF_RESKEY_dampening}" ]; then ++ OCF_RESKEY_dampening="30s" ++fi + + case "$__OCF_ACTION" in + meta-data) meta_data +-- +2.33.1.windows.1 + diff --git a/pacemaker.spec b/pacemaker.spec index fa1ed1fc0a28239c8a9d19ae35dec6bef3dcd116..6568195f936193f6ccbf7da72f17f180b80c6c1d 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -17,7 +17,7 @@ ## can be incremented to build packages reliably considered "newer" ## than previously built packages with the same pcmkversion) %global pcmkversion 2.1.6 -%global specversion 2 +%global specversion 3 ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build %global commit 6fdc9deea294bbad629b003c6ae036aaed8e3ee0 @@ -152,6 +152,7 @@ Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz # https://github.com/ClusterLabs/pacemaker/pull/3177 Patch0: 0001-Fix-glib-assertions.patch +Patch1: 0001-Add-the-parameter-of-dampening-and-fix-attrd_updater.patch # upstream commits @@ -772,6 +773,9 @@ exit 0 %license %{nagios_name}-%{nagios_hash}/COPYING %changelog +* Wed Aug 23 2023 liupei - 2.1.6-3 +- Add the parameter of attrd_delay and fix attrd_updter command + * Mon Aug 21 2023 jiangxinyu - 2.1.6-2 - Fix glib assertions due to asynchronous metadata action completing after shutdown begins