* Tue Aug 17 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.1-0.4.rc3
- Update for new upstream tarball for release candidate: Pacemaker-2.1.1-rc3, for full details, see included ChangeLog file or https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.1-rc3 - Make tools exit-codes consistent for --version - Check exit-codes of tools prior to manpage-generation
This commit is contained in:
parent
7889c6669e
commit
b2569f82a6
@ -1,122 +0,0 @@
|
||||
From ee7eba6a7a05bdf0a12d60ebabb334d8ee021101 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Gaillot <kgaillot@redhat.com>
|
||||
Date: Mon, 9 Aug 2021 14:48:57 -0500
|
||||
Subject: [PATCH] Fix: controller: ensure lost node's transient attributes are
|
||||
cleared without DC
|
||||
|
||||
Previously, peer_update_callback() cleared a lost node's transient attributes
|
||||
if either the local node is DC, or there is no DC.
|
||||
|
||||
However, that left the possibility of the DC being lost at the same time as
|
||||
another node -- the local node would still have fsa_our_dc set while processing
|
||||
the leave notifications, so no node would clear the attributes for the non-DC
|
||||
node.
|
||||
|
||||
Now, the controller has its own CPG configuration change callback, which sets a
|
||||
global boolean before calling the usual one, so that peer_update_callback() can
|
||||
know when the DC has been lost.
|
||||
---
|
||||
daemons/controld/controld_callbacks.c | 4 ++-
|
||||
daemons/controld/controld_corosync.c | 57 ++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 59 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/daemons/controld/controld_callbacks.c b/daemons/controld/controld_callbacks.c
|
||||
index af24856..e564b3d 100644
|
||||
--- a/daemons/controld/controld_callbacks.c
|
||||
+++ b/daemons/controld/controld_callbacks.c
|
||||
@@ -99,6 +99,8 @@ node_alive(const crm_node_t *node)
|
||||
|
||||
#define state_text(state) ((state)? (const char *)(state) : "in unknown state")
|
||||
|
||||
+bool controld_dc_left = false;
|
||||
+
|
||||
void
|
||||
peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *data)
|
||||
{
|
||||
@@ -217,7 +219,7 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d
|
||||
cib_scope_local);
|
||||
}
|
||||
|
||||
- } else if (AM_I_DC || (fsa_our_dc == NULL)) {
|
||||
+ } else if (AM_I_DC || controld_dc_left || (fsa_our_dc == NULL)) {
|
||||
/* This only needs to be done once, so normally the DC should do
|
||||
* it. However if there is no DC, every node must do it, since
|
||||
* there is no other way to ensure some one node does it.
|
||||
diff --git a/daemons/controld/controld_corosync.c b/daemons/controld/controld_corosync.c
|
||||
index db99630..c5ab658 100644
|
||||
--- a/daemons/controld/controld_corosync.c
|
||||
+++ b/daemons/controld/controld_corosync.c
|
||||
@@ -87,6 +87,61 @@ crmd_cs_destroy(gpointer user_data)
|
||||
}
|
||||
}
|
||||
|
||||
+extern bool controld_dc_left;
|
||||
+
|
||||
+/*!
|
||||
+ * \brief Handle a Corosync notification of a CPG configuration change
|
||||
+ *
|
||||
+ * \param[in] handle CPG connection
|
||||
+ * \param[in] cpg_name CPG group name
|
||||
+ * \param[in] member_list List of current CPG members
|
||||
+ * \param[in] member_list_entries Number of entries in \p member_list
|
||||
+ * \param[in] left_list List of CPG members that left
|
||||
+ * \param[in] left_list_entries Number of entries in \p left_list
|
||||
+ * \param[in] joined_list List of CPG members that joined
|
||||
+ * \param[in] joined_list_entries Number of entries in \p joined_list
|
||||
+ */
|
||||
+static void
|
||||
+cpg_membership_callback(cpg_handle_t handle, const struct cpg_name *cpg_name,
|
||||
+ const struct cpg_address *member_list,
|
||||
+ size_t member_list_entries,
|
||||
+ const struct cpg_address *left_list,
|
||||
+ size_t left_list_entries,
|
||||
+ const struct cpg_address *joined_list,
|
||||
+ size_t joined_list_entries)
|
||||
+{
|
||||
+ /* When nodes leave CPG, the DC clears their transient node attributes.
|
||||
+ *
|
||||
+ * However if there is no DC, or the DC is among the nodes that left, each
|
||||
+ * remaining node needs to do the clearing, to ensure it gets done.
|
||||
+ * Otherwise, the attributes would persist when the nodes rejoin, which
|
||||
+ * could have serious consequences for unfencing, agents that use attributes
|
||||
+ * for internal logic, etc.
|
||||
+ *
|
||||
+ * Here, we set a global boolean if the DC is among the nodes that left, for
|
||||
+ * use by the peer callback.
|
||||
+ */
|
||||
+ if (fsa_our_dc != NULL) {
|
||||
+ crm_node_t *peer = pcmk__search_cluster_node_cache(0, fsa_our_dc);
|
||||
+
|
||||
+ if (peer != NULL) {
|
||||
+ for (int i = 0; i < left_list_entries; ++i) {
|
||||
+ if (left_list[i].nodeid == peer->id) {
|
||||
+ controld_dc_left = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Process the change normally, which will call the peer callback as needed
|
||||
+ pcmk_cpg_membership(handle, cpg_name, member_list, member_list_entries,
|
||||
+ left_list, left_list_entries,
|
||||
+ joined_list, joined_list_entries);
|
||||
+
|
||||
+ controld_dc_left = false;
|
||||
+}
|
||||
+
|
||||
extern gboolean crm_connect_corosync(crm_cluster_t * cluster);
|
||||
|
||||
gboolean
|
||||
@@ -95,7 +150,7 @@ crm_connect_corosync(crm_cluster_t * cluster)
|
||||
if (is_corosync_cluster()) {
|
||||
crm_set_status_callback(&peer_update_callback);
|
||||
cluster->cpg.cpg_deliver_fn = crmd_cs_dispatch;
|
||||
- cluster->cpg.cpg_confchg_fn = pcmk_cpg_membership;
|
||||
+ cluster->cpg.cpg_confchg_fn = cpg_membership_callback;
|
||||
cluster->destroy = crmd_cs_destroy;
|
||||
|
||||
if (crm_cluster_connect(cluster)) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,82 @@
|
||||
From b34570ecaeb4fb0106dd0aa5a8776a5417a07f90 Mon Sep 17 00:00:00 2001
|
||||
From: Klaus Wenninger <klaus.wenninger@aon.at>
|
||||
Date: Mon, 16 Aug 2021 16:41:18 +0200
|
||||
Subject: [PATCH] Fix: tools: make exit-code stdout/stderr consistent with
|
||||
--version
|
||||
|
||||
---
|
||||
tools/crm_attribute.c | 2 +-
|
||||
tools/crm_diff.c | 2 +-
|
||||
tools/crm_error.c | 2 +-
|
||||
tools/crm_node.c | 2 +-
|
||||
tools/crm_rule.c | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c
|
||||
index 6bd4e2a..faf4aae 100644
|
||||
--- a/tools/crm_attribute.c
|
||||
+++ b/tools/crm_attribute.c
|
||||
@@ -326,7 +326,7 @@ main(int argc, char **argv)
|
||||
g_strfreev(processed_args);
|
||||
pcmk__free_arg_context(context);
|
||||
/* FIXME: When crm_attribute is converted to use formatted output, this can go. */
|
||||
- pcmk__cli_help('v', CRM_EX_USAGE);
|
||||
+ pcmk__cli_help('v', CRM_EX_OK);
|
||||
}
|
||||
|
||||
if (options.promotion_score && options.attr_name == NULL) {
|
||||
diff --git a/tools/crm_diff.c b/tools/crm_diff.c
|
||||
index 9890c10..18f5d48 100644
|
||||
--- a/tools/crm_diff.c
|
||||
+++ b/tools/crm_diff.c
|
||||
@@ -322,7 +322,7 @@ main(int argc, char **argv)
|
||||
g_strfreev(processed_args);
|
||||
pcmk__free_arg_context(context);
|
||||
/* FIXME: When crm_diff is converted to use formatted output, this can go. */
|
||||
- pcmk__cli_help('v', CRM_EX_USAGE);
|
||||
+ pcmk__cli_help('v', CRM_EX_OK);
|
||||
}
|
||||
|
||||
if (options.apply && options.no_version) {
|
||||
diff --git a/tools/crm_error.c b/tools/crm_error.c
|
||||
index 923f393..f26efe7 100644
|
||||
--- a/tools/crm_error.c
|
||||
+++ b/tools/crm_error.c
|
||||
@@ -93,7 +93,7 @@ main(int argc, char **argv)
|
||||
g_strfreev(processed_args);
|
||||
pcmk__free_arg_context(context);
|
||||
/* FIXME: When crm_error is converted to use formatted output, this can go. */
|
||||
- pcmk__cli_help('v', CRM_EX_USAGE);
|
||||
+ pcmk__cli_help('v', CRM_EX_OK);
|
||||
}
|
||||
|
||||
if (options.do_list) {
|
||||
diff --git a/tools/crm_node.c b/tools/crm_node.c
|
||||
index 25da978..489a39a 100644
|
||||
--- a/tools/crm_node.c
|
||||
+++ b/tools/crm_node.c
|
||||
@@ -549,7 +549,7 @@ main(int argc, char **argv)
|
||||
g_strfreev(processed_args);
|
||||
pcmk__free_arg_context(context);
|
||||
/* FIXME: When crm_node is converted to use formatted output, this can go. */
|
||||
- pcmk__cli_help('v', CRM_EX_USAGE);
|
||||
+ pcmk__cli_help('v', CRM_EX_OK);
|
||||
}
|
||||
|
||||
if (options.command == 0) {
|
||||
diff --git a/tools/crm_rule.c b/tools/crm_rule.c
|
||||
index 30c5155..0880415 100644
|
||||
--- a/tools/crm_rule.c
|
||||
+++ b/tools/crm_rule.c
|
||||
@@ -252,7 +252,7 @@ main(int argc, char **argv)
|
||||
g_strfreev(processed_args);
|
||||
pcmk__free_arg_context(context);
|
||||
/* FIXME: When crm_rule is converted to use formatted output, this can go. */
|
||||
- pcmk__cli_help('v', CRM_EX_USAGE);
|
||||
+ pcmk__cli_help('v', CRM_EX_OK);
|
||||
}
|
||||
|
||||
/* Check command line arguments before opening a connection to
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 2e0ac6390327e387e9b94e50080d13fd95f545d6 Mon Sep 17 00:00:00 2001
|
||||
From: Klaus Wenninger <klaus.wenninger@aon.at>
|
||||
Date: Mon, 16 Aug 2021 16:42:51 +0200
|
||||
Subject: [PATCH] Build: manpages: using help2man check exit-code of tools
|
||||
|
||||
---
|
||||
mk/common.mk | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/mk/common.mk b/mk/common.mk
|
||||
index aa59feb..c3d1993 100644
|
||||
--- a/mk/common.mk
|
||||
+++ b/mk/common.mk
|
||||
@@ -68,6 +68,12 @@ HELP2MAN_ARGS = -N --section 8 --name "Part of the Pacemaker cluster resource ma
|
||||
# and all wrappers to C code.
|
||||
%.8: % $(MAN8DEPS)
|
||||
$(AM_V_at)chmod a+x $(abs_builddir)/$<
|
||||
+ PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --version >/dev/null
|
||||
+ if [ -f $(abs_srcdir)/$@.inc ]; then \
|
||||
+ PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --help-all >/dev/null; \
|
||||
+ else \
|
||||
+ PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --help >/dev/null; \
|
||||
+ fi
|
||||
$(AM_V_MAN)if [ -f $(abs_srcdir)/$@.inc ]; then \
|
||||
PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) \
|
||||
-h --help-all \
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -32,10 +32,10 @@
|
||||
## can be incremented to build packages reliably considered "newer"
|
||||
## than previously built packages with the same pcmkversion)
|
||||
%global pcmkversion 2.1.1
|
||||
%global specversion 0.3.rc2
|
||||
%global specversion 0.4.rc3
|
||||
|
||||
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
|
||||
%global commit a64ad221abe9cdd968ceacd35c23832ce0fcd189
|
||||
%global commit c6a4f6e6cdcedf08e0bfd81248b86812c2a571b2
|
||||
|
||||
## Since git v2.11, the extent of abbreviation is autoscaled by default
|
||||
## (used to be constant of 7), so we need to convey it for non-tags, too.
|
||||
@ -219,7 +219,8 @@ Patch0: 0001-feature-watchdog-fencing-allow-restriction-to-certai.patch
|
||||
Patch1: 0002-Fix-watchdog-fencing-Silence-warning-without-node-re.patch
|
||||
Patch2: 0003-Fix-fence_watchdog-fix-version-output-needed-for-hel.patch
|
||||
Patch3: 0004-Build-rpm-package-fence_watchdog-in-base-package.patch
|
||||
Patch4: 0005-Fix-controller-ensure-lost-node-s-transient-attribut.patch
|
||||
Patch4: 0005-Fix-tools-make-exit-code-stdout-stderr-consistent-wi.patch
|
||||
Patch5: 0006-Build-manpages-using-help2man-check-exit-code-of-too.patch
|
||||
|
||||
# upstream commits
|
||||
|
||||
@ -828,6 +829,13 @@ exit 0
|
||||
%license %{nagios_name}-%{nagios_hash}/COPYING
|
||||
|
||||
%changelog
|
||||
* Tue Aug 17 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.1-0.4.rc3
|
||||
- Update for new upstream tarball for release candidate: Pacemaker-2.1.1-rc3,
|
||||
for full details, see included ChangeLog file or
|
||||
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.1-rc3
|
||||
- Make tools exit-codes consistent for --version
|
||||
- Check exit-codes of tools prior to manpage-generation
|
||||
|
||||
* Wed Aug 11 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.1-0.3.rc2
|
||||
- package fence_watchdog in base-package instead if cli-subpackage
|
||||
- fix version output of fence_watchdog as needed for help2man
|
||||
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad
|
||||
SHA512 (pacemaker-a64ad221a.tar.gz) = ee954bd8efd135965290f9958b65680cbf101e14e2fd22d326e53a250281a7e5b6b6ec979c7f76072514dbf4d29868e99931842dbcc99bab5e5ba5e4bbc4ef0a
|
||||
SHA512 (pacemaker-c6a4f6e6c.tar.gz) = 28a313c016add4f95ec2b546c468826c8234bafdc1a7a7d26b785733ee10ec209dc0dbf3f107df57604990b5f89b2d05831684b5d3adfd45479706d9c6d5654f
|
||||
|
Loading…
Reference in New Issue
Block a user