diff --git a/fix-HealthSMART-parameter-check.patch b/fix-HealthSMART-parameter-check.patch new file mode 100644 index 0000000000000000000000000000000000000000..8bc6c6450445c070ec90fccb1122f6aba9a4ed41 --- /dev/null +++ b/fix-HealthSMART-parameter-check.patch @@ -0,0 +1,67 @@ +From b0d133b3931295c12421e56b798e5deb3a83a060 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 7 Dec 2023 15:00:05 +0800 +Subject: [PATCH] fix HealthSMART parameter check + +--- + agents/ocf/HealthSMART.in | 41 ++++++++++++++++++++------------------- + 1 file changed, 21 insertions(+), 20 deletions(-) + +diff --git a/agents/ocf/HealthSMART.in b/agents/ocf/HealthSMART.in +index b6edac2..3b15339 100755 +--- a/agents/ocf/HealthSMART.in ++++ b/agents/ocf/HealthSMART.in +@@ -136,29 +136,30 @@ END + ####################################################################### + + check_temperature() { ++ if [ -n "$1" ]; then ++ if [ $1 -lt ${lower_red_limit} ] ; then ++ ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" ++ attrd_updater -n "#health-smart" -U "red" -d "${OCF_RESKEY_dampen}" ++ return 1 ++ fi + +- if [ $1 -lt ${lower_red_limit} ] ; then +- ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" +- attrd_updater -n "#health-smart" -U "red" -d "${OCF_RESKEY_dampen}" +- return 1 +- fi +- +- if [ $1 -gt ${upper_red_limit} ] ; then +- ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" +- attrd_updater -n "#health-smart" -U "red" -d "${OCF_RESKEY_dampen}" +- return 1 +- fi ++ if [ $1 -gt ${upper_red_limit} ] ; then ++ ocf_log info "Drive ${DRIVE} ${DEVICE} too hot: ${1} C" ++ attrd_updater -n "#health-smart" -U "red" -d "${OCF_RESKEY_dampen}" ++ return 1 ++ fi + +- if [ $1 -lt ${lower_yellow_limit} ] ; then +- ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" +- attrd_updater -n "#health-smart" -U "yellow" -d "${OCF_RESKEY_dampen}" +- return 1 +- fi ++ if [ $1 -lt ${lower_yellow_limit} ] ; then ++ ocf_log info "Drive ${DRIVE} ${DEVICE} quite cold: ${1} C" ++ attrd_updater -n "#health-smart" -U "yellow" -d "${OCF_RESKEY_dampen}" ++ return 1 ++ fi + +- if [ $1 -gt ${upper_yellow_limit} ] ; then +- ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" +- attrd_updater -n "#health-smart" -U "yellow" -d "${OCF_RESKEY_dampen}" +- return 1 ++ if [ $1 -gt ${upper_yellow_limit} ] ; then ++ ocf_log info "Drive ${DRIVE} ${DEVICE} quite hot: ${1} C" ++ attrd_updater -n "#health-smart" -U "yellow" -d "${OCF_RESKEY_dampen}" ++ return 1 ++ fi + fi + } + +-- +2.33.0 + diff --git a/pacemaker.spec b/pacemaker.spec index 317b7a84567c7104a7aea88fdb80a6ab8a19c61f..ba039ccac37eb1a08e9dc6019b5cc9cc78060360 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 10 +%global specversion 11 ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build %global commit 6fdc9deea294bbad629b003c6ae036aaed8e3ee0 @@ -160,6 +160,7 @@ Patch5: Fix-the-validation-function-of-input.patch Patch6: Fix-a-bug-in-clone-resource-description-display.patch Patch7: Fix-controller-not-check-watchdog-fencing-status.patch Patch8: fix-the-validation-function-of-input-for-IOWait.patch +Patch9: fix-HealthSMART-parameter-check.patch # upstream commits Requires: resource-agents @@ -779,6 +780,9 @@ exit 0 %license %{nagios_name}-%{nagios_hash}/COPYING %changelog +* Thu Dec 07 2023 bixiaoyan - 2.1.6-11 +- Adding parameter check in HealthSMART + * Tue Nov 28 2023 liupei - 2.1.6-10 - fix the validation function of input for IOWait