Skip to content

Commit 4886cd6

Browse files
author
Ken Gaillot
authored
Merge pull request #3733 from ClusterLabs/main
Pull main branch into 3.0 ahead of 3.0.0-rc1 release
2 parents cfd45a8 + 32fca61 commit 4886cd6

421 files changed

Lines changed: 13474 additions & 11081 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2011-2023 the Pacemaker project contributors
2+
# Copyright 2011-2024 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
@@ -222,7 +222,7 @@ TAGS
222222
/doc/sphinx/*/_build
223223
/doc/sphinx/*/conf.py
224224
/doc/sphinx/*/generated
225-
/doc/sphinx/build-2.1.txt
225+
/doc/sphinx/build-[0-9]*.txt
226226
/doc/sphinx/shared/images/*.png
227227

228228
# Test artifacts (from unit tests, regression tests, static analysis, etc.)

CONTRIBUTING.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
If you find Pacemaker useful and wish to support the project, you can:
44

5-
* Spread the word (on blogs, social media, mailing lists, Q&A websites, etc.).
6-
* Join and participate in the [mailing lists](https://clusterlabs.org/mailman/listinfo/).
5+
* Participate in the [ClusterLabs community](https://clusterlabs.org/community/).
76
* Report [bugs and new feature requests](https://bugs.clusterlabs.org/).
8-
* Contribute documentation, bug fixes, or features to the code base.
9-
10-
If you would like to contribute code base changes, please read
11-
[Pacemaker Development](https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Development/html/)
12-
for detailed information about pull requests and policies.
7+
* Contribute documentation, bug fixes, or features to the code base. (Read at
8+
least the FAQ in [Pacemaker
9+
Development](https://clusterlabs.org/projects/pacemaker/doc/3.0/Pacemaker_Development/html/)
10+
for information about pull requests and policies.)

ChangeLog

Lines changed: 0 additions & 4622 deletions
This file was deleted.

ChangeLog.md

Lines changed: 4703 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# or later (GPLv2+) WITHOUT ANY WARRANTY.
88
#
99

10+
include $(top_srcdir)/mk/common.mk
11+
1012
# This directory must be same as in configure.ac's AC_CONFIG_MACRO_DIR
1113
ACLOCAL_AMFLAGS = -I m4
1214

@@ -22,8 +24,7 @@ EXTRA_DIST = CONTRIBUTING.md \
2224

2325
DISTCLEANFILES = config.status
2426

25-
MAINTAINERCLEANFILES = Makefile.in \
26-
aclocal.m4 \
27+
MAINTAINERCLEANFILES += aclocal.m4 \
2728
config.guess \
2829
config.sub \
2930
configure \

README.markdown

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,24 @@
22

33
## What is Pacemaker?
44

5-
Pacemaker is an advanced, scalable high-availability cluster resource manager.
6-
7-
It supports "N-node" clusters with significant capabilities for
8-
managing resources and dependencies.
9-
10-
It will run scripts at initialization, when machines go up or down,
11-
when related resources fail and can be configured to periodically check
12-
resource health.
5+
Pacemaker is the resource manager for the
6+
[ClusterLabs](https://www.clusterlabs.org/) open-source high-availability
7+
cluster stack. It coordinates the configuration, start-up, monitoring, and
8+
recovery of interrelated services across all cluster nodes.
139

1410
## Who is Pacemaker?
1511

16-
Pacemaker is distributed by [ClusterLabs](https://www.clusterlabs.org/).
17-
1812
Pacemaker was initially created by main architect and lead developer
19-
Andrew Beekhof <andrew@beekhof.net>, with the aid of
13+
Andrew Beekhof <andrew@beekhof.net> with the aid of
2014
project catalyst and advocate Lars Marowsky-Brée <lmb@suse.de>.
2115

2216
Many, many developers have contributed significantly to the project since.
2317
The git log is the definitive record of their greatly appreciated
2418
contributions.
2519

26-
The wider community of Pacemaker users is another essential aspect of the
27-
project's existence, especially the many users who participate in the mailing
28-
lists, blog about HA clustering, and otherwise actively make the project more
29-
useful.
20+
The wider ClusterLabs community is another essential aspect of the project's
21+
existence, especially the many users who participate in the mailing lists, blog
22+
about HA clustering, and otherwise actively make the project more useful.
3023

3124
## Where do I get Pacemaker?
3225

@@ -41,37 +34,12 @@ development code, or download one of the official
4134

4235
See [INSTALL.md](https://github.com/ClusterLabs/pacemaker/blob/main/INSTALL.md).
4336

44-
## What higher-level interfaces to Pacemaker are available?
45-
46-
There are multiple user interfaces for Pacemaker, including command-line
47-
tools, graphical user interfaces and web frontends. The crm shell
48-
used to be included in the Pacemaker source tree, but is now
49-
a separate project.
50-
51-
This is not an exhaustive list:
52-
53-
* crmsh: https://github.com/ClusterLabs/crmsh
54-
* pcs: https://github.com/ClusterLabs/pcs
55-
* LCMC: http://lcmc.sourceforge.net/
56-
* hawk: https://github.com/ClusterLabs/hawk
57-
* Striker: https://github.com/ClusterLabs/striker
58-
59-
### Can I convert some other cluster configuration to Pacemaker?
60-
61-
[clufter](https://github.com/jnpkrn/clufter) is a general-purpose tool
62-
for converting one cluster representation format to another. Among other
63-
possibilities, it can convert from a cluster based on rgmanager with CMAN to
64-
a one based on pacemaker with corosync. See its documentation for details.
65-
6637
## How can I help?
6738

6839
See [CONTRIBUTING.md](https://github.com/ClusterLabs/pacemaker/blob/main/CONTRIBUTING.md).
6940

7041
## Where can I find more information about Pacemaker?
7142

72-
* [ClusterLabs website](https://www.clusterlabs.org/)
73-
* [Documentation](https://www.clusterlabs.org/pacemaker/doc/)
74-
* [Issues/Bugs](https://bugs.clusterlabs.org/)
75-
* [Mailing lists](https://projects.clusterlabs.org/w/clusterlabs/clusterlabs_mailing_lists/)
76-
for users and developers
77-
* [ClusterLabs IRC channel](https://projects.clusterlabs.org/w/clusterlabs/clusterlabs_irc_channel/)
43+
* [Documentation](https://www.clusterlabs.org/projects/pacemaker/doc/)
44+
* [Bug reporter](https://bugs.clusterlabs.org/)
45+
* [The ClusterLabs community](https://clusterlabs.org/community/)

agents/ocf/attribute.in

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# ocf:pacemaker:attribute resource agent
44
#
5-
# Copyright 2016-2023 the Pacemaker project contributors
5+
# Copyright 2016-2024 the Pacemaker project contributors
66
#
77
# The version control history for this file may have further details.
88
#
@@ -14,15 +14,16 @@ USAGE="Usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate-all|meta-d
1414
1515
Expects to have a fully populated OCF RA-compliant environment set."
1616

17-
# Load OCF helper functions
17+
# If the OCF helper funtions aren't available, we can still show metadata.
1818
: ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"}
19-
. "${OCF_FUNCTIONS}"
19+
[ -r "${OCF_FUNCTIONS}" ] && . "${OCF_FUNCTIONS}"
20+
2021
: ${__OCF_ACTION:="$1"}
2122

2223
# Ensure certain variables are set and not empty
23-
: ${HA_VARRUN:="/var/run"}
24+
: ${HA_VARRUN:="@runstatedir@"}
2425
: ${OCF_RESKEY_CRM_meta_globally_unique:="false"}
25-
: ${OCF_RESOURCE_INSTANCE:="undef"}
26+
: ${OCF_RESOURCE_INSTANCE:="RESOURCENAME"}
2627

2728
DEFAULT_STATE_FILE="${HA_VARRUN%%/}/opa-${OCF_RESOURCE_INSTANCE}.state"
2829
if [ "${OCF_RESKEY_CRM_meta_globally_unique}" = "false" ]; then

configure.ac

Lines changed: 54 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,23 +1007,28 @@ AC_SUBST([GETOPT_PATH])
10071007
dnl ===============================================
10081008
dnl Libraries
10091009
dnl ===============================================
1010-
AC_CHECK_LIB(socket, socket) dnl -lsocket
1011-
AC_CHECK_LIB(c, dlopen) dnl if dlopen is in libc...
1012-
AC_CHECK_LIB(dl, dlopen) dnl -ldl (for Linux)
1013-
AC_CHECK_LIB(rt, sched_getscheduler) dnl -lrt (for Tru64)
1014-
AC_CHECK_LIB(gnugetopt, getopt_long) dnl -lgnugetopt ( if available )
1015-
AC_CHECK_LIB(pam, pam_start) dnl -lpam (if available)
1010+
AC_SEARCH_LIBS([socket], [socket])
1011+
1012+
save_LIBS="$LIBS"
1013+
DL_LIBS=""
1014+
LIBS=""
1015+
AC_SEARCH_LIBS([dlopen], [dl],
1016+
[test "$ac_cv_search_dlopen" = "none required" || DL_LIBS="$LIBS"])
1017+
AC_SUBST(DL_LIBS)
1018+
LIBS="$save_LIBS"
1019+
1020+
save_LIBS="$LIBS"
1021+
PAM_LIBS=""
1022+
LIBS=""
1023+
AC_SEARCH_LIBS([pam_start], [pam],
1024+
[test "$ac_cv_search_pam_start" = "none required" || PAM_LIBS="$LIBS"])
1025+
AC_SUBST(PAM_LIBS)
1026+
LIBS="$save_LIBS"
10161027

10171028
PKG_CHECK_MODULES([UUID], [uuid],
10181029
[CPPFLAGS="${CPPFLAGS} ${UUID_CFLAGS}"
10191030
LIBS="${LIBS} ${UUID_LIBS}"])
10201031

1021-
AC_CHECK_FUNCS([sched_setscheduler])
1022-
AS_IF([test x"$ac_cv_func_sched_setscheduler" != x"yes"],
1023-
[PC_LIBS_RT=""],
1024-
[PC_LIBS_RT="-lrt"])
1025-
AC_SUBST(PC_LIBS_RT)
1026-
10271032
# Require minimum glib version
10281033
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.0],
10291034
[CPPFLAGS="${CPPFLAGS} ${GLIB_CFLAGS}"
@@ -1032,15 +1037,6 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.0],
10321037
# Check whether high-resolution sleep function is available
10331038
AC_CHECK_FUNCS([nanosleep usleep])
10341039

1035-
#
1036-
# Where is dlopen?
1037-
#
1038-
AS_IF([test x"$ac_cv_lib_c_dlopen" = x"yes"],
1039-
[LIBADD_DL=""],
1040-
[test x"$ac_cv_lib_dl_dlopen" = x"yes"],
1041-
[LIBADD_DL=-ldl],
1042-
[LIBADD_DL=${lt_cv_dlopen_libs}])
1043-
10441040
PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.9.2],
10451041
[CPPFLAGS="${CPPFLAGS} ${LIBXML2_CFLAGS}"
10461042
LIBS="${LIBS} ${LIBXML2_LIBS}"])
@@ -1189,6 +1185,7 @@ dnl ========================================================================
11891185
REQUIRE_FUNC([alphasort])
11901186
REQUIRE_FUNC([getopt])
11911187
REQUIRE_FUNC([scandir])
1188+
REQUIRE_FUNC([sched_getscheduler])
11921189
REQUIRE_FUNC([setenv])
11931190
REQUIRE_FUNC([strndup])
11941191
REQUIRE_FUNC([strnlen])
@@ -1258,45 +1255,20 @@ dnl ncurses takes precedence.
12581255
dnl
12591256
AC_CHECK_HEADERS([curses.h curses/curses.h ncurses.h ncurses/ncurses.h])
12601257

1261-
dnl Although n-library is preferred, only look for it if the n-header was found.
1262-
CURSESLIBS=''
1263-
PC_NAME_CURSES=""
1264-
PC_LIBS_CURSES=""
1265-
AS_IF([test x"$ac_cv_header_ncurses_h" = x"yes"], [
1266-
AC_CHECK_LIB(ncurses, printw,
1267-
[AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)])
1268-
CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
1269-
PC_NAME_CURSES="ncurses"
1270-
])
1271-
1272-
AS_IF([test x"$ac_cv_header_ncurses_ncurses_h" = x"yes"], [
1273-
AC_CHECK_LIB(ncurses, printw,
1274-
[AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)])
1275-
CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
1276-
PC_NAME_CURSES="ncurses"
1277-
])
1278-
1279-
dnl Only look for non-n-library if there was no n-library.
1280-
AS_IF([test x"$CURSESLIBS" = x"" && test x"$ac_cv_header_curses_h" = x"yes"], [
1281-
AC_CHECK_LIB(curses, printw,
1282-
[CURSESLIBS='-lcurses'; AC_DEFINE(HAVE_LIBCURSES,1, have curses library)])
1283-
PC_LIBS_CURSES="$CURSESLIBS"
1284-
])
1285-
1286-
dnl Only look for non-n-library if there was no n-library.
1287-
AS_IF([test x"$CURSESLIBS" = x"" && test x"$ac_cv_header_curses_curses_h" = x"yes"], [
1288-
AC_CHECK_LIB(curses, printw,
1289-
[CURSESLIBS='-lcurses'; AC_DEFINE(HAVE_LIBCURSES,1, have curses library)])
1290-
PC_LIBS_CURSES="$CURSESLIBS"
1291-
])
1292-
1293-
AS_IF([test x"$CURSESLIBS" != x""],
1294-
[PCMK_FEATURES="$PCMK_FEATURES ncurses"])
1258+
save_LIBS="$LIBS"
1259+
found_curses=0
1260+
CURSES_LIBS=""
1261+
LIBS=""
1262+
AC_SEARCH_LIBS([printw], [ncurses curses],
1263+
[test "$ac_cv_search_printw" = "none required" || CURSES_LIBS="$LIBS"
1264+
found_curses=1],
1265+
[found_curses=0])
1266+
LIBS="$save_LIBS"
12951267

12961268
dnl Check for printw() prototype compatibility
1297-
AS_IF([test x"$CURSESLIBS" != x"" && cc_supports_flag -Wcast-qual], [
1298-
ac_save_LIBS=$LIBS
1299-
LIBS="$CURSESLIBS"
1269+
AS_IF([test $found_curses -eq 1 && cc_supports_flag -Wcast-qual], [
1270+
ac_save_LIBS="$LIBS"
1271+
LIBS="$CURSES_LIBS"
13001272
13011273
# avoid broken test because of hardened build environment in Fedora 23+
13021274
# - https://fedoraproject.org/wiki/Changes/Harden_All_Packages
@@ -1314,12 +1286,18 @@ AS_IF([test x"$CURSESLIBS" != x"" && cc_supports_flag -Wcast-qual], [
13141286
# include <ncurses/ncurses.h>
13151287
#elif defined(HAVE_CURSES_H)
13161288
# include <curses.h>
1289+
#elif defined(HAVE_CURSES_CURSES_H)
1290+
# include <curses/curses.h>
13171291
#endif
13181292
],
13191293
[printw((const char *)"Test");]
13201294
)],
1321-
[AC_MSG_RESULT([yes])],
1295+
[AC_MSG_RESULT([yes])
1296+
PCMK_FEATURES="$PCMK_FEATURES ncurses"
1297+
],
13221298
[
1299+
found_curses=0
1300+
CURSES_LIBS=""
13231301
AC_MSG_RESULT([no])
13241302
AC_MSG_WARN(m4_normalize([Disabling curses because the printw()
13251303
function of your (n)curses library is old.
@@ -1328,18 +1306,15 @@ AS_IF([test x"$CURSESLIBS" != x"" && cc_supports_flag -Wcast-qual], [
13281306
recommended, available from
13291307
https://invisible-island.net/ncurses/)
13301308
]))
1331-
AC_DEFINE([HAVE_INCOMPATIBLE_PRINTW], [1],
1332-
[Define to 1 if curses library has incompatible printw()])
13331309
]
13341310
)
13351311
1336-
LIBS=$ac_save_LIBS
1312+
LIBS="$ac_save_LIBS"
13371313
cc_restore_flags
13381314
])
13391315

1340-
AC_SUBST(CURSESLIBS)
1341-
AC_SUBST(PC_NAME_CURSES)
1342-
AC_SUBST(PC_LIBS_CURSES)
1316+
AC_DEFINE_UNQUOTED([PCMK__ENABLE_CURSES], [$found_curses], [have ncurses library])
1317+
AC_SUBST(CURSES_LIBS)
13431318

13441319
dnl ========================================================================
13451320
dnl Profiling and GProf
@@ -1404,8 +1379,18 @@ AS_IF([test x"$cross_compiling" != x"yes"],
14041379
[CPPFLAGS="$CPPFLAGS -I${prefix}/include/heartbeat"])
14051380
AC_CHECK_HEADERS([stonith/stonith.h],
14061381
[
1407-
AC_CHECK_LIB([pils], [PILLoadPlugin])
1408-
AC_CHECK_LIB([plumb], [G_main_add_IPC_Channel])
1382+
save_LIBS="$LIBS"
1383+
STONITH_LIBS=""
1384+
LIBS=""
1385+
AC_SEARCH_LIBS([PILLoadPlugin], [pils],
1386+
[test "$ac_cv_search_PILLoadPlugin" = "none required" || STONITH_LIBS="$LIBS"])
1387+
1388+
LIBS=""
1389+
AC_SEARCH_LIBS([G_main_add_IPC_Channel], [plumb],
1390+
[test "$ac_cv_search_G_main_add_IPC_Channel" = "none required" || STONITH_LIBS="$STONITH_LIBS $LIBS"])
1391+
AC_SUBST(STONITH_LIBS)
1392+
LIBS="$save_LIBS"
1393+
14091394
PCMK_FEATURES="$PCMK_FEATURES lha"
14101395
])
14111396
AM_CONDITIONAL([BUILD_LHA_SUPPORT], [test x"$ac_cv_header_stonith_stonith_h" = x"yes"])
@@ -2047,6 +2032,8 @@ AC_CONFIG_FILES(Makefile \
20472032
lib/common/tests/strings/Makefile \
20482033
lib/common/tests/utils/Makefile \
20492034
lib/common/tests/xml/Makefile \
2035+
lib/common/tests/xml_comment/Makefile \
2036+
lib/common/tests/xml_element/Makefile \
20502037
lib/common/tests/xpath/Makefile \
20512038
lib/fencing/Makefile \
20522039
lib/libpacemaker.pc \

cts/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
# or later (GPLv2+) WITHOUT ANY WARRANTY.
88
#
99

10+
include $(top_srcdir)/mk/common.mk
1011
include $(top_srcdir)/mk/python.mk
1112

12-
MAINTAINERCLEANFILES = Makefile.in
13-
1413
# Test commands and globally applicable test files should be in $(testdir),
1514
# and command-specific test data should be in a command-specific subdirectory.
1615
testdir = $(datadir)/$(PACKAGE)/tests

cts/benchmark/Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#
2-
# Copyright 2001-2023 the Pacemaker project contributors
2+
# Copyright 2001-2024 the Pacemaker project contributors
33
#
44
# The version control history for this file may have further details.
55
#
66
# This source code is licensed under the GNU General Public License version 2
77
# or later (GPLv2+) WITHOUT ANY WARRANTY.
88
#
9-
MAINTAINERCLEANFILES = Makefile.in
9+
10+
include $(top_srcdir)/mk/common.mk
1011

1112
benchdir = $(datadir)/$(PACKAGE)/tests/cts/benchmark
1213
dist_bench_DATA = README.benchmark \

0 commit comments

Comments
 (0)