From 924f5ea83e48277e014ebf0d19a27187cb93e2f7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 3 Jun 2024 15:39:28 +0200 Subject: Adding upstream version 2.1.8~rc1. Signed-off-by: Daniel Baumann --- agents/ocf/HealthCPU.in | 4 +--- agents/ocf/HealthIOWait.in | 26 +++++++++++++++++++++----- agents/ocf/HealthSMART.in | 46 ++++++++++++++++++++++++---------------------- agents/ocf/SysInfo.in | 6 ++++-- agents/ocf/o2cb.in | 3 ++- 5 files changed, 52 insertions(+), 33 deletions(-) (limited to 'agents') diff --git a/agents/ocf/HealthCPU.in b/agents/ocf/HealthCPU.in index 14e4b07..1a691a9 100755 --- a/agents/ocf/HealthCPU.in +++ b/agents/ocf/HealthCPU.in @@ -26,6 +26,7 @@ : ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"} . "${OCF_FUNCTIONS}" : ${__OCF_ACTION:="$1"} +: ${OCF_RESKEY_dampening:="30s"} ####################################################################### @@ -196,9 +197,6 @@ 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 diff --git a/agents/ocf/HealthIOWait.in b/agents/ocf/HealthIOWait.in index ba7a17a..65ce901 100755 --- a/agents/ocf/HealthIOWait.in +++ b/agents/ocf/HealthIOWait.in @@ -19,6 +19,7 @@ : ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"} . "${OCF_FUNCTIONS}" : ${__OCF_ACTION:="$1"} +: ${OCF_RESKEY_dampening:="5s"} ####################################################################### @@ -60,12 +61,22 @@ the #health-iowait will go red if the %iowait of the CPU get higher than 15%. + + +The time to wait (dampening) in seconds for further changes before writing + +The time to wait (dampening) in seconds for further changes +before writing + + + + @@ -77,7 +88,7 @@ END agent_usage() { cat < -Lower limit of the temperature in deg C of the drive(s). Below this limit the status will be red. +Lower limit of the temperature in deg C of the drive(s). Below this limit the status of #health-smart will be red. Lower limit for the red smart attribute @@ -116,7 +116,7 @@ The path to the smartctl program, used for querying device health. The time to wait (dampening) for further changes to occur Dampening interval - + @@ -137,28 +137,30 @@ END check_temperature() { - if [ $1 -lt ${lower_red_limit} ] ; then - ocf_log info "Drive ${DRIVE} ${DEVICE} too cold: ${1} C" - attrd_updater -n "#health-smart" -B "red" -d "${OCF_RESKEY_dampen}" - return 1 - fi + 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" -B "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" -B "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" -B "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" -B "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" -B "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" -B "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" -B "yellow" -d "${OCF_RESKEY_dampen}" + return 1 + fi fi } @@ -350,7 +352,7 @@ fi case "$__OCF_ACTION" in start) HealthSMART_start;; stop) HealthSMART_stop;; - monitor) HealthSMART_monitor;; + monitor) HealthSMART_validate && HealthSMART_monitor;; validate-all) HealthSMART_validate;; reload-agent) HealthSMART_reload_agent;; meta-data) diff --git a/agents/ocf/SysInfo.in b/agents/ocf/SysInfo.in index 5c2c7c7..d3a18f9 100755 --- a/agents/ocf/SysInfo.in +++ b/agents/ocf/SysInfo.in @@ -160,9 +160,11 @@ UpdateStat() { value="$*" printf "%s:\t%s\n" "$name" "$value" if [ "$__OCF_ACTION" = "start" ] ; then - "${HA_SBIN_DIR}/attrd_updater" ${OCF_RESKEY_delay} -S status -n $name -B "$value" + "${HA_SBIN_DIR}/attrd_updater" -d ${OCF_RESKEY_delay} -S status \ + -n $name -B "$value" else - "${HA_SBIN_DIR}/attrd_updater" ${OCF_RESKEY_delay} -S status -n $name -v "$value" + "${HA_SBIN_DIR}/attrd_updater" -d ${OCF_RESKEY_delay} -S status \ + -n $name -v "$value" fi } diff --git a/agents/ocf/o2cb.in b/agents/ocf/o2cb.in index f85d2f4..6db9d2b 100755 --- a/agents/ocf/o2cb.in +++ b/agents/ocf/o2cb.in @@ -366,7 +366,8 @@ meta_data() { 1.0 -This Resource Agent controls the userspace daemon needed by OCFS2. +This Resource Agent controls the userspace daemon needed by OCFS2. This agent +is deprecated and will be removed in Pacemaker 3.0.0. OCFS2 daemon resource agent -- cgit v1.2.3