Skip to content

Commit

Permalink
Merge pull request #3461 from ClusterLabs/main
Browse files Browse the repository at this point in the history
Pull main branch into 2.1 for 2.1.8-rc1 release
  • Loading branch information
kgaillot committed May 14, 2024
2 parents 0f7f883 + 9d0f308 commit d8741bf
Show file tree
Hide file tree
Showing 632 changed files with 56,220 additions and 29,133 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ configure
/tools/pcmk_simtimes
/tools/report.collector
/tools/report.common
/xml/version-diff.sh
/xml/rng-helper

# Compiled targets and intermediary files
*.o
Expand Down Expand Up @@ -247,6 +247,7 @@ pacemaker_*.info
/lib/*/tests/*/*.log
/lib/*/tests/*/*_test
/lib/*/tests/*/*.trs
/lib/common/tests/schemas/schemas
/xml/test-*/*.up
/xml/test-*/*.up.err
/xml/assets/*.rng
Expand Down Expand Up @@ -338,7 +339,7 @@ pacemaker_*.info
/lib/common/tests/utils/pcmk_str_is_infinity
/lib/common/tests/utils/pcmk_str_is_minus_infinity
/lib/gnu/libgnu.a
/lib/pengine/tests/rules/pe_cron_range_satisfied
/lib/pengine/tests/rules/
/lrmd
/ltmain.sh
/mcp
Expand All @@ -351,4 +352,5 @@ pacemaker_*.info
/tools/cluster-init
/test-driver
/xml/crm.dtd
/xml/version-diff.sh
ylwrap
3 changes: 1 addition & 2 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ The text of these licenses are provided in the "licenses" subdirectory.

If you find any deviations from this policy, or wish to inquire about alternate
licensing arrangements, please e-mail the developers@ClusterLabs.org mailing
list. Licensing issues are further discussed on the ClusterLabs wiki
(at https://wiki.clusterlabs.org/wiki/License).
list.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@
+ resources: drop broken configdir parameter from ocf:pacemaker:controld

- For further details, see:
https://wiki.clusterlabs.org/wiki/Pacemaker_2.0_Changes
https://projects.clusterlabs.org/w/projects/pacemaker/pacemaker_2.0_changes/


* Tue Nov 14 2017 Ken Gaillot <kgaillot@redhat.com> Pacemaker-1.1.18
Expand Down
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ build: init
# Pass option depending on whether automake has been run or not
USE_FILE = $(shell test -e rpm/Makefile || echo "-f Makefile.am")

.PHONY: $(PACKAGE).spec chroot dirty export mock rc release rpm rpmlint srpm
$(PACKAGE).spec chroot dirty export mock rc release rpm rpmlint srpm:
.PHONY: $(PACKAGE).spec chroot dirty export mock rc release rpm srpm
$(PACKAGE).spec chroot dirty export mock rc release rpm srpm:
$(MAKE) $(AM_MAKEFLAGS) -C rpm $(USE_FILE) "$@"

mock-% rpm-% spec-% srpm-%: FORCE
Expand Down
17 changes: 9 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,23 @@ Also:
| RPM packages via "make rpm" | 4.11 or later | rpm | rpm | (n/a) |
| unit tests | 1.1.0 or later | libcmocka-devel | libcmocka-devel | libcmocka-dev |

## Optional testing dependencies
* procps and psmisc (if running cts-exec, cts-fencing, or CTS)
* valgrind (if running CTS valgrind tests)
* python3-systemd (if using CTS on cluster nodes running systemd)
## Optional Testing Dependencies
* procps and psmisc (if running cts-exec, cts-fencing, or CTS lab)
* valgrind (if running valgrind tests in cts-cli, cts-scheduler, or CTS lab)
* python3-dateutil and python3-systemd (if running CTS lab on cluster nodes
running systemd)
* nmap (if not specifying an IP address base)
* oprofile (if running CTS profiling tests)
* dlm (to log DLM debugging info after CTS tests)
* oprofile (if running CTS lab profiling tests)
* dlm (to log DLM debugging info after CTS lab tests)
* xmllint (to validate tool output in cts-cli)

## Simple install
## Simple Install

$ make && sudo make install

If GNU make is not your default make, use "gmake" instead.

## Detailed install
## Detailed Install

First, browse the build options that are available:

Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2003-2023 the Pacemaker project contributors
# Copyright 2003-2024 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
Expand Down
5 changes: 3 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ See [CONTRIBUTING.md](https://github.com/ClusterLabs/pacemaker/blob/main/CONTRIB
* [ClusterLabs website](https://www.clusterlabs.org/)
* [Documentation](https://www.clusterlabs.org/pacemaker/doc/)
* [Issues/Bugs](https://bugs.clusterlabs.org/)
* [Mailing lists](https://wiki.clusterlabs.org/wiki/Mailing_lists) for users and developers
* [ClusterLabs IRC channel](https://wiki.clusterlabs.org/wiki/ClusterLabs_IRC_channel)
* [Mailing lists](https://projects.clusterlabs.org/w/clusterlabs/clusterlabs_mailing_lists/)
for users and developers
* [ClusterLabs IRC channel](https://projects.clusterlabs.org/w/clusterlabs/clusterlabs_irc_channel/)
18 changes: 18 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Security Policy

## Supported Versions

Pacemaker's 2.1 and 3.0 release series are actively developed and receive
security fixes.

## Reporting a Vulnerability

If you have a support contract with an operating system vendor such as Red Hat
or SUSE, please submit potentially security-related reports via the vendor's
usual method. Otherwise, please submit a report via:

https://github.com/ClusterLabs/pacemaker/security

## Past Vulnerabilities

See https://projects.clusterlabs.org/w/cluster_administration/cves/
4 changes: 1 addition & 3 deletions agents/ocf/HealthCPU.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
: ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"}
. "${OCF_FUNCTIONS}"
: ${__OCF_ACTION:="$1"}
: ${OCF_RESKEY_dampening:="30s"}

#######################################################################

Expand Down Expand Up @@ -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
Expand Down
26 changes: 21 additions & 5 deletions agents/ocf/HealthIOWait.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
: ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"}
. "${OCF_FUNCTIONS}"
: ${__OCF_ACTION:="$1"}
: ${OCF_RESKEY_dampening:="5s"}

#######################################################################

Expand Down Expand Up @@ -60,12 +61,22 @@ the #health-iowait will go red if the %iowait of the CPU get higher than 15%.
<content type="integer" default="15"/>
</parameter>
<parameter name="dampening" reloadable="1">
<longdesc lang="en">
The time to wait (dampening) in seconds for further changes before writing
</longdesc>
<shortdesc lang="en">The time to wait (dampening) in seconds for further changes
before writing</shortdesc>
<content type="string" default="5s"/>
</parameter>
</parameters>
<actions>
<action name="start" timeout="10s" />
<action name="stop" timeout="10s" />
<action name="monitor" timeout="10s" interval="10s" start-delay="0s" />
<action name="reload-agent" timeout="20s" />
<action name="meta-data" timeout="5s" />
<action name="validate-all" timeout="10s" depth="0" />
</actions>
Expand All @@ -77,7 +88,7 @@ END

agent_usage() {
cat <<END
usage: $0 {start|stop|monitor|validate-all|meta-data}
usage: $0 {start|stop|monitor|reload-agent|validate-all|meta-data}
Expects to have a fully populated OCF RA-compliant environment set.
END
Expand Down Expand Up @@ -109,22 +120,26 @@ agent_monitor() {
# echo $OCF_RESKEY_yellow_limit
if [ $WAIT -gt ${OCF_RESKEY_red_limit} ] ; then
# echo "System state RED!"
attrd_updater -n "#health-iowait" -U "red" -d "5s"
attrd_updater -n "#health-iowait" -B "red" -d "${OCF_RESKEY_dampening}"
return $OCF_SUCCESS
fi

if [ $WAIT -gt ${OCF_RESKEY_yellow_limit} ] ; then
# echo "System state yellow."
attrd_updater -n "#health-iowait" -U "yellow" -d "5s"
attrd_updater -n "#health-iowait" -B "yellow" -d "${OCF_RESKEY_dampening}"
else
# echo "System state green."
attrd_updater -n "#health-iowait" -U "green" -d "5s"
attrd_updater -n "#health-iowait" -B "green" -d "${OCF_RESKEY_dampening}"
fi
return $OCF_SUCCESS
fi
return $OCF_NOT_RUNNING
}

agent_reload_agent() {
return $OCF_SUCCESS
}

is_integer() {
case "$1" in
""|*[0-9]*) return 0 ;;
Expand Down Expand Up @@ -181,7 +196,8 @@ meta-data) meta_data
;;
start) agent_start;;
stop) agent_stop;;
monitor) agent_monitor;;
monitor) agent_validate && agent_monitor;;
reload-agent) agent_reload_agent;;
validate-all) agent_validate;;
usage|help) agent_usage
exit $OCF_SUCCESS
Expand Down
46 changes: 24 additions & 22 deletions agents/ocf/HealthSMART.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The device type(s) to assume for the drive(s) being tested as a SPACE separated
<parameter name="temp_lower_limit" reloadable="1">
<longdesc lang="en">
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.
</longdesc>
<shortdesc lang="en">Lower limit for the red smart attribute</shortdesc>
<content type="string" default="0"/>
Expand Down Expand Up @@ -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
</longdesc>
<shortdesc lang="en">Dampening interval</shortdesc>
<content type="integer" default="5s"/>
<content type="string" default="5s"/>
</parameter>
</parameters>
Expand All @@ -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
}

Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions agents/ocf/SysInfo.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion agents/ocf/o2cb.in
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ meta_data() {
<resource-agent name="o2cb" version="@VERSION@">
<version>1.0</version>
<longdesc lang="en">
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.
</longdesc>
<shortdesc lang="en">OCFS2 daemon resource agent</shortdesc>
<parameters>
Expand Down
Loading

0 comments on commit d8741bf

Please sign in to comment.