import pacemaker-2.1.6-8.el8

c8 imports/c8/pacemaker-2.1.6-8.el8
MSVSphere Packaging Team 1 year ago
parent d373233fa3
commit 40970786fd

2
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/nagios-agents-metadata-105ab8a.tar.gz SOURCES/nagios-agents-metadata-105ab8a.tar.gz
SOURCES/pacemaker-a3f4479.tar.gz SOURCES/pacemaker-6fdc9deea.tar.gz

@ -1,2 +1,2 @@
ea6c0a27fd0ae8ce02f84a11f08a0d79377041c3 SOURCES/nagios-agents-metadata-105ab8a.tar.gz ea6c0a27fd0ae8ce02f84a11f08a0d79377041c3 SOURCES/nagios-agents-metadata-105ab8a.tar.gz
883efa27f94c6a07942f51cf7c8959c5fbb624fe SOURCES/pacemaker-a3f4479.tar.gz fbf71fb3fb42c76f9f1e98497505eb8521cab55e SOURCES/pacemaker-6fdc9deea.tar.gz

@ -0,0 +1,402 @@
From cf53f523e691295879cd75cff1a86bc15664fa51 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 09:59:13 -0400
Subject: [PATCH 1/7] Feature: daemons: Add start state to LRMD handshake XML
This gets read out of /etc/sysconfig/pacemaker and set into the
environment. The remote node executor will then add that to the XML
that it sends to the controller upon startup.
Ref T183
---
daemons/execd/execd_commands.c | 5 +++++
include/crm_internal.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/daemons/execd/execd_commands.c b/daemons/execd/execd_commands.c
index fa2761e..9a783a5 100644
--- a/daemons/execd/execd_commands.c
+++ b/daemons/execd/execd_commands.c
@@ -1474,6 +1474,7 @@ process_lrmd_signon(pcmk__client_t *client, xmlNode *request, int call_id,
int rc = pcmk_ok;
time_t now = time(NULL);
const char *protocol_version = crm_element_value(request, F_LRMD_PROTOCOL_VERSION);
+ const char *start_state = pcmk__env_option(PCMK__ENV_NODE_START_STATE);
if (compare_version(protocol_version, LRMD_MIN_PROTOCOL_VERSION) < 0) {
crm_err("Cluster API version must be greater than or equal to %s, not %s",
@@ -1503,6 +1504,10 @@ process_lrmd_signon(pcmk__client_t *client, xmlNode *request, int call_id,
crm_xml_add(*reply, F_LRMD_PROTOCOL_VERSION, LRMD_PROTOCOL_VERSION);
crm_xml_add_ll(*reply, PCMK__XA_UPTIME, now - start_time);
+ if (start_state) {
+ crm_xml_add(*reply, PCMK__XA_NODE_START_STATE, start_state);
+ }
+
return rc;
}
diff --git a/include/crm_internal.h b/include/crm_internal.h
index 5f6531f..771bd26 100644
--- a/include/crm_internal.h
+++ b/include/crm_internal.h
@@ -84,6 +84,7 @@
#define PCMK__XA_GRAPH_ERRORS "graph-errors"
#define PCMK__XA_GRAPH_WARNINGS "graph-warnings"
#define PCMK__XA_MODE "mode"
+#define PCMK__XA_NODE_START_STATE "node_start_state"
#define PCMK__XA_TASK "task"
#define PCMK__XA_UPTIME "uptime"
#define PCMK__XA_CONN_HOST "connection_host"
--
2.31.1
From c950291742711b5c4c8986adc8e938fe6fef861c Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 10:04:32 -0400
Subject: [PATCH 2/7] Feature: liblrmd: Save a remote node's requested start
state
Ref T183
---
include/crm/common/ipc_internal.h | 1 +
lib/lrmd/lrmd_client.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/crm/common/ipc_internal.h b/include/crm/common/ipc_internal.h
index 5099dda..d203924 100644
--- a/include/crm/common/ipc_internal.h
+++ b/include/crm/common/ipc_internal.h
@@ -112,6 +112,7 @@ struct pcmk__remote_s {
int tcp_socket;
mainloop_io_t *source;
time_t uptime;
+ char *start_state;
/* CIB-only */
char *token;
diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c
index c565728..4239105 100644
--- a/lib/lrmd/lrmd_client.c
+++ b/lib/lrmd/lrmd_client.c
@@ -588,7 +588,9 @@ lrmd_tls_connection_destroy(gpointer userdata)
}
free(native->remote->buffer);
+ free(native->remote->start_state);
native->remote->buffer = NULL;
+ native->remote->start_state = NULL;
native->source = 0;
native->sock = 0;
native->psk_cred_c = NULL;
@@ -980,6 +982,7 @@ lrmd_handshake(lrmd_t * lrmd, const char *name)
const char *version = crm_element_value(reply, F_LRMD_PROTOCOL_VERSION);
const char *msg_type = crm_element_value(reply, F_LRMD_OPERATION);
const char *tmp_ticket = crm_element_value(reply, F_LRMD_CLIENTID);
+ const char *start_state = crm_element_value(reply, PCMK__XA_NODE_START_STATE);
long long uptime = -1;
crm_element_value_int(reply, F_LRMD_RC, &rc);
@@ -992,6 +995,10 @@ lrmd_handshake(lrmd_t * lrmd, const char *name)
crm_element_value_ll(reply, PCMK__XA_UPTIME, &uptime);
native->remote->uptime = uptime;
+ if (start_state) {
+ native->remote->start_state = strdup(start_state);
+ }
+
if (rc == -EPROTO) {
crm_err("Executor protocol version mismatch between client (%s) and server (%s)",
LRMD_PROTOCOL_VERSION, version);
--
2.31.1
From 7302014c7b7296be31b1f542b3f107d55b1fb2a0 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 10:05:13 -0400
Subject: [PATCH 3/7] Feature: liblrmd: Add lrmd__node_start_state.
This function is used to get the start state out of an lrmd_private_t
structure.
Ref T183
---
include/crm/lrmd_internal.h | 1 +
lib/lrmd/lrmd_client.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/include/crm/lrmd_internal.h b/include/crm/lrmd_internal.h
index 5810554..d1cd25d 100644
--- a/include/crm/lrmd_internal.h
+++ b/include/crm/lrmd_internal.h
@@ -47,6 +47,7 @@ void lrmd__set_result(lrmd_event_data_t *event, enum ocf_exitcode rc,
void lrmd__reset_result(lrmd_event_data_t *event);
time_t lrmd__uptime(lrmd_t *lrmd);
+const char *lrmd__node_start_state(lrmd_t *lrmd);
/* Shared functions for IPC proxy back end */
diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c
index 4239105..82434b9 100644
--- a/lib/lrmd/lrmd_client.c
+++ b/lib/lrmd/lrmd_client.c
@@ -2538,3 +2538,15 @@ lrmd__uptime(lrmd_t *lrmd)
return native->remote->uptime;
}
}
+
+const char *
+lrmd__node_start_state(lrmd_t *lrmd)
+{
+ lrmd_private_t *native = lrmd->lrmd_private;
+
+ if (native->remote == NULL) {
+ return NULL;
+ } else {
+ return native->remote->start_state;
+ }
+}
--
2.31.1
From e5e4d43f847da0930bae12f63c7e9d9c44c07cdf Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 10:07:58 -0400
Subject: [PATCH 4/7] Refactor: controller: Make set_join_state a public
function.
This already does all the work of setting a node's start state. It just
needs to be made public and given arguments for what node to set instead
of reading globals.
Ref T183
---
daemons/controld/controld_join_client.c | 20 ++++++++++----------
daemons/controld/pacemaker-controld.h | 3 +++
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/daemons/controld/controld_join_client.c b/daemons/controld/controld_join_client.c
index da6a9d6..07e2a27 100644
--- a/daemons/controld/controld_join_client.c
+++ b/daemons/controld/controld_join_client.c
@@ -195,32 +195,31 @@ join_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *
free_xml(generation);
}
-static void
-set_join_state(const char * start_state)
+void
+set_join_state(const char *start_state, const char *node_name, const char *node_uuid)
{
if (pcmk__str_eq(start_state, "standby", pcmk__str_casei)) {
crm_notice("Forcing node %s to join in %s state per configured "
- "environment", controld_globals.our_nodename, start_state);
+ "environment", node_name, start_state);
cib__update_node_attr(controld_globals.logger_out,
controld_globals.cib_conn, cib_sync_call,
- XML_CIB_TAG_NODES, controld_globals.our_uuid,
+ XML_CIB_TAG_NODES, node_uuid,
NULL, NULL, NULL, "standby", "on", NULL, NULL);
} else if (pcmk__str_eq(start_state, "online", pcmk__str_casei)) {
crm_notice("Forcing node %s to join in %s state per configured "
- "environment", controld_globals.our_nodename, start_state);
+ "environment", node_name, start_state);
cib__update_node_attr(controld_globals.logger_out,
controld_globals.cib_conn, cib_sync_call,
- XML_CIB_TAG_NODES, controld_globals.our_uuid,
+ XML_CIB_TAG_NODES, node_uuid,
NULL, NULL, NULL, "standby", "off", NULL, NULL);
} else if (pcmk__str_eq(start_state, "default", pcmk__str_casei)) {
- crm_debug("Not forcing a starting state on node %s",
- controld_globals.our_nodename);
+ crm_debug("Not forcing a starting state on node %s", node_name);
} else {
crm_warn("Unrecognized start state '%s', using 'default' (%s)",
- start_state, controld_globals.our_nodename);
+ start_state, node_name);
}
}
@@ -335,7 +334,8 @@ do_cl_join_finalize_respond(long long action,
first_join = FALSE;
if (start_state) {
- set_join_state(start_state);
+ set_join_state(start_state, controld_globals.our_nodename,
+ controld_globals.our_uuid);
}
}
diff --git a/daemons/controld/pacemaker-controld.h b/daemons/controld/pacemaker-controld.h
index 1484a00..d8c2ddd 100644
--- a/daemons/controld/pacemaker-controld.h
+++ b/daemons/controld/pacemaker-controld.h
@@ -36,4 +36,7 @@ void controld_remove_voter(const char *uname);
void controld_election_fini(void);
void controld_stop_current_election_timeout(void);
+void set_join_state(const char *start_state, const char *node_name,
+ const char *node_uuid);
+
#endif
--
2.31.1
From 63d069adb344bba2c982013226f87dfd95afaff3 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 13:38:03 -0400
Subject: [PATCH 5/7] Refactor: controller: set_join_state needs to take a
remote parameter.
Without this parameter, we won't know what to pass to as node_type to
cib__update_node_attr. And without that, that function will not know to
update a remote node - it'll try to update a regular node by the same
name, which either doesn't exist or is not what we were hoping would
happen.
Ref T138
---
daemons/controld/controld_join_client.c | 11 +++++++----
daemons/controld/pacemaker-controld.h | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/daemons/controld/controld_join_client.c b/daemons/controld/controld_join_client.c
index 07e2a27..799d1b4 100644
--- a/daemons/controld/controld_join_client.c
+++ b/daemons/controld/controld_join_client.c
@@ -196,7 +196,8 @@ join_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *
}
void
-set_join_state(const char *start_state, const char *node_name, const char *node_uuid)
+set_join_state(const char *start_state, const char *node_name, const char *node_uuid,
+ bool remote)
{
if (pcmk__str_eq(start_state, "standby", pcmk__str_casei)) {
crm_notice("Forcing node %s to join in %s state per configured "
@@ -204,7 +205,8 @@ set_join_state(const char *start_state, const char *node_name, const char *node_
cib__update_node_attr(controld_globals.logger_out,
controld_globals.cib_conn, cib_sync_call,
XML_CIB_TAG_NODES, node_uuid,
- NULL, NULL, NULL, "standby", "on", NULL, NULL);
+ NULL, NULL, NULL, "standby", "on", NULL,
+ remote ? "remote" : NULL);
} else if (pcmk__str_eq(start_state, "online", pcmk__str_casei)) {
crm_notice("Forcing node %s to join in %s state per configured "
@@ -212,7 +214,8 @@ set_join_state(const char *start_state, const char *node_name, const char *node_
cib__update_node_attr(controld_globals.logger_out,
controld_globals.cib_conn, cib_sync_call,
XML_CIB_TAG_NODES, node_uuid,
- NULL, NULL, NULL, "standby", "off", NULL, NULL);
+ NULL, NULL, NULL, "standby", "off", NULL,
+ remote ? "remote" : NULL);
} else if (pcmk__str_eq(start_state, "default", pcmk__str_casei)) {
crm_debug("Not forcing a starting state on node %s", node_name);
@@ -335,7 +338,7 @@ do_cl_join_finalize_respond(long long action,
first_join = FALSE;
if (start_state) {
set_join_state(start_state, controld_globals.our_nodename,
- controld_globals.our_uuid);
+ controld_globals.our_uuid, false);
}
}
diff --git a/daemons/controld/pacemaker-controld.h b/daemons/controld/pacemaker-controld.h
index d8c2ddd..2334cce 100644
--- a/daemons/controld/pacemaker-controld.h
+++ b/daemons/controld/pacemaker-controld.h
@@ -37,6 +37,6 @@ void controld_election_fini(void);
void controld_stop_current_election_timeout(void);
void set_join_state(const char *start_state, const char *node_name,
- const char *node_uuid);
+ const char *node_uuid, bool remote);
#endif
--
2.31.1
From 67274787898355065315f8c06d62458e2c2b0afe Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 10:09:02 -0400
Subject: [PATCH 6/7] Feature: controller: When a remote node starts, apply any
start state.
If we were given a start state in the handshake XML, that is now stored
in the remote node cache's private data. Extract it and set the state
on the node with set_node_state.
Fixes T183
---
daemons/controld/controld_remote_ra.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/daemons/controld/controld_remote_ra.c b/daemons/controld/controld_remote_ra.c
index f24b755..8ab1e46 100644
--- a/daemons/controld/controld_remote_ra.c
+++ b/daemons/controld/controld_remote_ra.c
@@ -280,6 +280,7 @@ remote_node_up(const char *node_name)
int call_opt;
xmlNode *update, *state;
crm_node_t *node;
+ lrm_state_t *connection_rsc = NULL;
CRM_CHECK(node_name != NULL, return);
crm_info("Announcing Pacemaker Remote node %s", node_name);
@@ -301,6 +302,20 @@ remote_node_up(const char *node_name)
purge_remote_node_attrs(call_opt, node);
pcmk__update_peer_state(__func__, node, CRM_NODE_MEMBER, 0);
+ /* Apply any start state that we were given from the environment on the
+ * remote node.
+ */
+ connection_rsc = lrm_state_find(node->uname);
+
+ if (connection_rsc != NULL) {
+ lrmd_t *lrm = connection_rsc->conn;
+ const char *start_state = lrmd__node_start_state(lrm);
+
+ if (start_state) {
+ set_join_state(start_state, node->uname, node->uuid, true);
+ }
+ }
+
/* pacemaker_remote nodes don't participate in the membership layer,
* so cluster nodes don't automatically get notified when they come and go.
* We send a cluster message to the DC, and update the CIB node state entry,
--
2.31.1
From 91cdda7056c9b9254a0d7e7a016b30f788e3e3ff Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 2 May 2023 10:16:30 -0400
Subject: [PATCH 7/7] Doc: sysconfig: Remote nodes now respect start state.
Ref T183
---
etc/sysconfig/pacemaker.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/etc/sysconfig/pacemaker.in b/etc/sysconfig/pacemaker.in
index 3b03ad6..041da71 100644
--- a/etc/sysconfig/pacemaker.in
+++ b/etc/sysconfig/pacemaker.in
@@ -144,8 +144,7 @@
# By default, the local host will join the cluster in an online or standby
# state when Pacemaker first starts depending on whether it was previously put
# into standby mode. If this variable is set to "standby" or "online", it will
-# force the local host to join in the specified state. This has no effect on
-# Pacemaker Remote nodes.
+# force the local host to join in the specified state.
#
# Default: PCMK_node_start_state="default"
--
2.31.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,98 +0,0 @@
From d8e08729ad5e3dc62f774172f992210902fc0ed4 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 23 Jan 2023 14:25:56 -0600
Subject: [PATCH] High: executor: fix regression in remote node shutdown
This reverts the essential part of d61494347, which was based on misdiagnosing
a remote node shutdown issue. Initially, it was thought that a "TLS server
session ended" log just after a remote node requested shutdown indicated that
the proxy connection coincidentally dropped at that moment. It actually is the
routine stopping of accepting new proxy connections, and existing when that
happens makes the remote node exit immediately without waiting for the
all-clear from the cluster.
Fixes T361
---
daemons/execd/pacemaker-execd.c | 19 +------------------
daemons/execd/pacemaker-execd.h | 3 +--
daemons/execd/remoted_tls.c | 6 +-----
3 files changed, 3 insertions(+), 25 deletions(-)
diff --git a/daemons/execd/pacemaker-execd.c b/daemons/execd/pacemaker-execd.c
index db12674f13..491808974a 100644
--- a/daemons/execd/pacemaker-execd.c
+++ b/daemons/execd/pacemaker-execd.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2022 the Pacemaker project contributors
+ * Copyright 2012-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -305,23 +305,6 @@ lrmd_exit(gpointer data)
return FALSE;
}
-/*!
- * \internal
- * \brief Clean up and exit if shutdown has started
- *
- * \return Doesn't return
- */
-void
-execd_exit_if_shutting_down(void)
-{
-#ifdef PCMK__COMPILE_REMOTE
- if (shutting_down) {
- crm_warn("exit because TLS connection was closed and 'shutting_down' set");
- lrmd_exit(NULL);
- }
-#endif
-}
-
/*!
* \internal
* \brief Request cluster shutdown if appropriate, otherwise exit immediately
diff --git a/daemons/execd/pacemaker-execd.h b/daemons/execd/pacemaker-execd.h
index 6646ae29e3..f78e8dcdde 100644
--- a/daemons/execd/pacemaker-execd.h
+++ b/daemons/execd/pacemaker-execd.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2022 the Pacemaker project contributors
+ * Copyright 2012-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -105,6 +105,5 @@ void remoted_spawn_pidone(int argc, char **argv, char **envp);
int process_lrmd_alert_exec(pcmk__client_t *client, uint32_t id,
xmlNode *request);
void lrmd_drain_alerts(GMainLoop *mloop);
-void execd_exit_if_shutting_down(void);
#endif // PACEMAKER_EXECD__H
diff --git a/daemons/execd/remoted_tls.c b/daemons/execd/remoted_tls.c
index 6f4b2d0062..c65e3f394d 100644
--- a/daemons/execd/remoted_tls.c
+++ b/daemons/execd/remoted_tls.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2022 the Pacemaker project contributors
+ * Copyright 2012-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -250,10 +250,6 @@ static void
tls_server_dropped(gpointer user_data)
{
crm_notice("TLS server session ended");
- /* If we are in the process of shutting down, then we should actually exit.
- * bz#1804259
- */
- execd_exit_if_shutting_down();
return;
}
--
2.31.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,35 @@
From 770d417e28dc9527fec8b8a00caaba8825995454 Mon Sep 17 00:00:00 2001
From: Grace Chin <gchin@redhat.com>
Date: Wed, 19 Jul 2023 10:25:55 -0400
Subject: [PATCH] Fix: tools: Fix a bug in clone resource description display
Previously, descriptions of resources running on multiple
nodes were displayed despite --full not being used (with pcs
status) or --show-detail not being used (with crm_mon).
For example, clone resources running on multiple nodes were
affected.
Now, --full and --show-detail must be used in order for resource
descriptions to be displayed, regardless of the number of nodes
the resource is run on.
see bz: 2106642
---
lib/pengine/pe_output.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
index e0b43d997a..d1c9f6e226 100644
--- a/lib/pengine/pe_output.c
+++ b/lib/pengine/pe_output.c
@@ -20,8 +20,7 @@ pe__resource_description(const pe_resource_t *rsc, uint32_t show_opts)
{
const char * desc = NULL;
// User-supplied description
- if (pcmk_any_flags_set(show_opts, pcmk_show_rsc_only|pcmk_show_description)
- || pcmk__list_of_multiple(rsc->running_on)) {
+ if (pcmk_any_flags_set(show_opts, pcmk_show_rsc_only|pcmk_show_description)) {
desc = crm_element_value(rsc->xml, XML_ATTR_DESC);
}
return desc;

@ -1,107 +0,0 @@
From 45617b727e280cac384a28ae3d96145e066e6197 Mon Sep 17 00:00:00 2001
From: Reid Wahl <nrwahl@protonmail.com>
Date: Fri, 3 Feb 2023 12:08:57 -0800
Subject: [PATCH 01/02] Fix: fencer: Prevent double g_source_remove of op_timer_one
QE observed a rarely reproducible core dump in the fencer during
Pacemaker shutdown, in which we try to g_source_remove() an op timer
that's already been removed.
free_stonith_remote_op_list()
-> g_hash_table_destroy()
-> g_hash_table_remove_all_nodes()
-> clear_remote_op_timers()
-> g_source_remove()
-> crm_glib_handler()
-> "Source ID 190 was not found when attempting to remove it"
The likely cause is that request_peer_fencing() doesn't set
op->op_timer_one to 0 after calling g_source_remove() on it, so if that
op is still in the stonith_remote_op_list at shutdown with the same
timer, clear_remote_op_timers() tries to remove the source for
op_timer_one again.
There are only five locations that call g_source_remove() on a
remote_fencing_op_t timer.
* Three of them are in clear_remote_op_timers(), which first 0-checks
the timer and then sets it to 0 after g_source_remove().
* One is in remote_op_query_timeout(), which does the same.
* The last is the one we fix here in request_peer_fencing().
I don't know all the conditions of QE's test scenario at this point.
What I do know:
* have-watchdog=true
* stonith-watchdog-timeout=10
* no explicit topology
* fence agent script is missing for the configured fence device
* requested fencing of one node
* cluster shutdown
Fixes RHBZ2166967
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
---
daemons/fenced/fenced_remote.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemons/fenced/fenced_remote.c b/daemons/fenced/fenced_remote.c
index d61b5bd..b7426ff 100644
--- a/daemons/fenced/fenced_remote.c
+++ b/daemons/fenced/fenced_remote.c
@@ -1825,6 +1825,7 @@ request_peer_fencing(remote_fencing_op_t *op, peer_device_info_t *peer)
op->state = st_exec;
if (op->op_timer_one) {
g_source_remove(op->op_timer_one);
+ op->op_timer_one = 0;
}
if (!((stonith_watchdog_timeout_ms > 0)
--
2.31.1
From 0291db4750322ec7f01ae6a4a2a30abca9d8e19e Mon Sep 17 00:00:00 2001
From: Reid Wahl <nrwahl@protonmail.com>
Date: Wed, 15 Feb 2023 22:30:27 -0800
Subject: [PATCH 02/02] Fix: fencer: Avoid double source remove of op_timer_total
remote_op_timeout() returns G_SOURCE_REMOVE, which tells GLib to remove
the source from the main loop after returning. Currently this function
is used as the callback only when creating op->op_timer_total.
If we don't set op->op_timer_total to 0 before returning from
remote_op_timeout(), then we can get an assertion and core dump from
GLib when the op's timers are being cleared (either during op
finalization or during fencer shutdown). This is because
clear_remote_op_timers() sees that op->op_timer_total != 0 and tries to
remove the source, but the source has already been removed.
Note that we're already (correctly) zeroing op->op_timer_one and
op->query_timeout as appropriate in their respective callback functions.
Fortunately, GLib doesn't care whether the source has already been
removed before we return G_SOURCE_REMOVE from a callback. So it's safe
to call finalize_op() (which removes all the op's timer sources) from
within a callback.
Fixes RHBZ#2166967
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
---
daemons/fenced/fenced_remote.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/daemons/fenced/fenced_remote.c b/daemons/fenced/fenced_remote.c
index b7426ff88..adea3d7d8 100644
--- a/daemons/fenced/fenced_remote.c
+++ b/daemons/fenced/fenced_remote.c
@@ -718,6 +718,8 @@ remote_op_timeout(gpointer userdata)
{
remote_fencing_op_t *op = userdata;
+ op->op_timer_total = 0;
+
if (op->state == st_done) {
crm_debug("Action '%s' targeting %s for client %s already completed "
CRM_XS " id=%.8s",
--
2.39.0

@ -12,7 +12,7 @@ diff --git a/tools/attrd_updater.c b/tools/attrd_updater.c
index b615a3575..4688b9ff6 100644 index b615a3575..4688b9ff6 100644
--- a/tools/attrd_updater.c --- a/tools/attrd_updater.c
+++ b/tools/attrd_updater.c +++ b/tools/attrd_updater.c
@@ -445,7 +445,7 @@ @@ -501,7 +501,7 @@ send_attrd_update(char command, const char *attr_node, const char *attr_name,
case 'U': case 'U':
rc = pcmk__attrd_api_update(NULL, attr_node, attr_name, attr_value, rc = pcmk__attrd_api_update(NULL, attr_node, attr_name, attr_value,

@ -1,151 +0,0 @@
From 0d15568a538349ac41028db6b506d13dd23e8732 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 14 Feb 2023 14:00:37 -0500
Subject: [PATCH] High: libcrmcommon: Fix handling node=NULL in
pcmk__attrd_api_query.
According to the header file, if node is NULL, pcmk__attrd_api_query
should query the value of the given attribute on all cluster nodes.
This is also what the server expects and how attrd_updater is supposed
to work.
However, pcmk__attrd_api_query has no way of letting callers decide
whether they want to query all nodes or whether they want to use the
local node. We were passing NULL for the node name, which it took to
mean it should look up the local node name. This calls
pcmk__node_attr_target, which probes the local cluster name and returns
that to pcmk__attrd_api_query. If it returns non-NULL, that value will
then be put into the XML IPC call which means the server will only
return the value for that node.
In testing this was usually fine. However, in pratice, the methods
pcmk__node_attr_target uses to figure out the local cluster node name
involves checking the OCF_RESKEY_CRM_meta_on_node environment variable
among others.
This variable was never set in testing, but can be set in the real
world. This leads to circumstances where the user did "attrd_updater -QA"
expecting to get the values on all nodes, but instead only got the value
on the local cluster node.
In pacemaker-2.1.4 and prior, pcmk__node_attr_target was simply never
called if the node was NULL but was called otherwise.
The fix is to modify pcmk__attrd_api_query to take an option for
querying all nodes. If that's present, we'll query all nodes. If it's
not present, we'll look at the given node name - NULL means look it up,
anything else means just that node.
Regression in 2.1.5 introduced by eb20a65577
---
include/crm/common/attrd_internal.h | 6 +++++-
include/crm/common/ipc_attrd_internal.h | 7 +++++--
lib/common/ipc_attrd.c | 12 ++++++++----
tools/attrd_updater.c | 5 +++--
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/include/crm/common/attrd_internal.h b/include/crm/common/attrd_internal.h
index 389be48..7337c38 100644
--- a/include/crm/common/attrd_internal.h
+++ b/include/crm/common/attrd_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2022 the Pacemaker project contributors
+ * Copyright 2004-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -25,6 +25,10 @@ enum pcmk__node_attr_opts {
pcmk__node_attr_perm = (1 << 5),
pcmk__node_attr_sync_local = (1 << 6),
pcmk__node_attr_sync_cluster = (1 << 7),
+ // pcmk__node_attr_utilization is 8, but that has not been backported.
+ // I'm leaving the gap here in case we backport that in the future and
+ // also to avoid problems on mixed-version clusters.
+ pcmk__node_attr_query_all = (1 << 9),
};
#define pcmk__set_node_attr_flags(node_attr_flags, flags_to_set) do { \
diff --git a/include/crm/common/ipc_attrd_internal.h b/include/crm/common/ipc_attrd_internal.h
index 2c6713f..b1b7584 100644
--- a/include/crm/common/ipc_attrd_internal.h
+++ b/include/crm/common/ipc_attrd_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 the Pacemaker project contributors
+ * Copyright 2022-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -110,10 +110,13 @@ int pcmk__attrd_api_purge(pcmk_ipc_api_t *api, const char *node);
*
* \param[in,out] api Connection to pacemaker-attrd
* \param[in] node Look up the attribute for this node
- * (or NULL for all nodes)
+ * (or NULL for the local node)
* \param[in] name Attribute name
* \param[in] options Bitmask of pcmk__node_attr_opts
*
+ * \note Passing pcmk__node_attr_query_all will cause the function to query
+ * the value of \p name on all nodes, regardless of the value of \p node.
+ *
* \return Standard Pacemaker return code
*/
int pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name,
diff --git a/lib/common/ipc_attrd.c b/lib/common/ipc_attrd.c
index 4606509..dece49b 100644
--- a/lib/common/ipc_attrd.c
+++ b/lib/common/ipc_attrd.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2022 the Pacemaker project contributors
+ * Copyright 2011-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -332,10 +332,14 @@ pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name,
return EINVAL;
}
- target = pcmk__node_attr_target(node);
+ if (pcmk_is_set(options, pcmk__node_attr_query_all)) {
+ node = NULL;
+ } else {
+ target = pcmk__node_attr_target(node);
- if (target != NULL) {
- node = target;
+ if (target != NULL) {
+ node = target;
+ }
}
request = create_attrd_op(NULL);
diff --git a/tools/attrd_updater.c b/tools/attrd_updater.c
index 3cd766d..cbd341d 100644
--- a/tools/attrd_updater.c
+++ b/tools/attrd_updater.c
@@ -376,6 +376,7 @@ attrd_event_cb(pcmk_ipc_api_t *attrd_api, enum pcmk_ipc_event event_type,
static int
send_attrd_query(pcmk__output_t *out, const char *attr_name, const char *attr_node, gboolean query_all)
{
+ uint32_t options = pcmk__node_attr_none;
pcmk_ipc_api_t *attrd_api = NULL;
int rc = pcmk_rc_ok;
@@ -400,10 +401,10 @@ send_attrd_query(pcmk__output_t *out, const char *attr_name, const char *attr_no
/* Decide which node(s) to query */
if (query_all == TRUE) {
- attr_node = NULL;
+ options |= pcmk__node_attr_query_all;
}
- rc = pcmk__attrd_api_query(attrd_api, attr_node, attr_name, 0);
+ rc = pcmk__attrd_api_query(attrd_api, attr_node, attr_name, options);
if (rc != pcmk_rc_ok) {
g_set_error(&error, PCMK__RC_ERROR, rc, "Could not query value of %s: %s (%d)",
--
2.31.1

@ -26,7 +26,7 @@ diff --git a/lib/common/ipc_controld.c b/lib/common/ipc_controld.c
index 3c3a98964..405fd0518 100644 index 3c3a98964..405fd0518 100644
--- a/lib/common/ipc_controld.c --- a/lib/common/ipc_controld.c
+++ b/lib/common/ipc_controld.c +++ b/lib/common/ipc_controld.c
@@ -143,18 +143,16 @@ @@ -177,18 +177,16 @@ set_nodes_data(pcmk_controld_api_reply_t *data, xmlNode *msg_data)
static bool static bool
reply_expected(pcmk_ipc_api_t *api, xmlNode *request) reply_expected(pcmk_ipc_api_t *api, xmlNode *request)
{ {
@ -55,7 +55,7 @@ index 3c3a98964..405fd0518 100644
} }
static bool static bool
@@ -168,22 +166,12 @@ @@ -202,22 +200,12 @@ dispatch(pcmk_ipc_api_t *api, xmlNode *reply)
pcmk_controld_reply_unknown, NULL, NULL, pcmk_controld_reply_unknown, NULL, NULL,
}; };
@ -83,7 +83,7 @@ index 3c3a98964..405fd0518 100644
} }
if (private->replies_expected > 0) { if (private->replies_expected > 0) {
@@ -310,18 +298,15 @@ @@ -344,18 +332,15 @@ static int
send_controller_request(pcmk_ipc_api_t *api, xmlNode *request, send_controller_request(pcmk_ipc_api_t *api, xmlNode *request,
bool reply_is_expected) bool reply_is_expected)
{ {

@ -1,142 +0,0 @@
From 17cc49e1564b0ae55cc8212d14c5c055f88040da Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 14 Feb 2023 15:35:37 +0100
Subject: [PATCH] Fix: watchdog-fencing: terminate dangling timer before
watchdog-waiting
---
daemons/fenced/fenced_remote.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/daemons/fenced/fenced_remote.c b/daemons/fenced/fenced_remote.c
index 5c3fe25e3..aab185adb 100644
--- a/daemons/fenced/fenced_remote.c
+++ b/daemons/fenced/fenced_remote.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2022 the Pacemaker project contributors
+ * Copyright 2009-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -1702,6 +1702,10 @@ check_watchdog_fencing_and_wait(remote_fencing_op_t * op)
"client %s " CRM_XS " id=%.8s",
(stonith_watchdog_timeout_ms / 1000),
op->target, op->action, op->client_name, op->id);
+
+ if (op->op_timer_one) {
+ g_source_remove(op->op_timer_one);
+ }
op->op_timer_one = g_timeout_add(stonith_watchdog_timeout_ms,
remote_op_watchdog_done, op);
return TRUE;
--
2.39.0
From f2cc2a4277124230903a18713e50604a8f1842cd Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Wed, 1 Mar 2023 15:00:15 +0100
Subject: [PATCH] Refactor: watchdog-fencing: convenience function
pcmk__is_fencing_action
for consistency and add comment making clear why this block exits
with new timer set in any case
---
daemons/fenced/fenced_remote.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/daemons/fenced/fenced_remote.c b/daemons/fenced/fenced_remote.c
index aab185adb..e0f8de057 100644
--- a/daemons/fenced/fenced_remote.c
+++ b/daemons/fenced/fenced_remote.c
@@ -1834,7 +1834,7 @@ request_peer_fencing(remote_fencing_op_t *op, peer_device_info_t *peer)
if (!((stonith_watchdog_timeout_ms > 0)
&& (pcmk__str_eq(device, STONITH_WATCHDOG_ID, pcmk__str_none)
|| (pcmk__str_eq(peer->host, op->target, pcmk__str_casei)
- && !pcmk__str_eq(op->action, "on", pcmk__str_none)))
+ && pcmk__is_fencing_action(op->action)))
&& check_watchdog_fencing_and_wait(op))) {
/* Some thoughts about self-fencing cases reaching this point:
@@ -1854,6 +1854,9 @@ request_peer_fencing(remote_fencing_op_t *op, peer_device_info_t *peer)
Otherwise the selection of stonith-watchdog-timeout at
least is questionable.
*/
+
+ /* coming here we're not waiting for watchdog timeout -
+ thus engage timer with timout evaluated before */
op->op_timer_one = g_timeout_add((1000 * timeout_one), remote_op_timeout_one, op);
}
--
2.39.0
From c4eb45a986f8865fc5e69350fd5b9f4b056d9d69 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 14 Feb 2023 11:57:17 +0100
Subject: [PATCH] Fix: watchdog-fencing: correctly derive timeout with topology
up to now the timeout for watchdog-fencing was just added to
the overall timeout if the node to be fenced was visible and
reported back to the query.
---
daemons/fenced/fenced_remote.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/daemons/fenced/fenced_remote.c b/daemons/fenced/fenced_remote.c
index e0f8de057..3b7ab05e9 100644
--- a/daemons/fenced/fenced_remote.c
+++ b/daemons/fenced/fenced_remote.c
@@ -969,8 +969,9 @@ advance_topology_level(remote_fencing_op_t *op, bool empty_ok)
return pcmk_rc_ok;
}
- crm_info("All fencing options targeting %s for client %s@%s failed "
+ crm_info("All %sfencing options targeting %s for client %s@%s failed "
CRM_XS " id=%.8s",
+ (stonith_watchdog_timeout_ms > 0)?"non-watchdog ":"",
op->target, op->client_name, op->originator, op->id);
return ENODEV;
}
@@ -1434,8 +1435,17 @@ stonith_choose_peer(remote_fencing_op_t * op)
&& pcmk_is_set(op->call_options, st_opt_topology)
&& (advance_topology_level(op, false) == pcmk_rc_ok));
- crm_notice("Couldn't find anyone to fence (%s) %s using %s",
- op->action, op->target, (device? device : "any device"));
+ if ((stonith_watchdog_timeout_ms > 0)
+ && pcmk__is_fencing_action(op->action)
+ && pcmk__str_eq(device, STONITH_WATCHDOG_ID, pcmk__str_none)
+ && node_does_watchdog_fencing(op->target)) {
+ crm_info("Couldn't contact watchdog-fencing target-node (%s)",
+ op->target);
+ /* check_watchdog_fencing_and_wait will log additional info */
+ } else {
+ crm_notice("Couldn't find anyone to fence (%s) %s using %s",
+ op->action, op->target, (device? device : "any device"));
+ }
return NULL;
}
@@ -1531,6 +1541,18 @@ get_op_total_timeout(const remote_fencing_op_t *op,
continue;
}
for (device_list = tp->levels[i]; device_list; device_list = device_list->next) {
+ /* in case of watchdog-device we add the timeout to the budget
+ regardless of if we got a reply or not
+ */
+ if ((stonith_watchdog_timeout_ms > 0)
+ && pcmk__is_fencing_action(op->action)
+ && pcmk__str_eq(device_list->data, STONITH_WATCHDOG_ID,
+ pcmk__str_none)
+ && node_does_watchdog_fencing(op->target)) {
+ total_timeout += stonith_watchdog_timeout_ms / 1000;
+ continue;
+ }
+
for (iter = op->query_results; iter != NULL; iter = iter->next) {
const peer_device_info_t *peer = iter->data;
--
2.39.0

@ -17,12 +17,12 @@ diff --git a/daemons/controld/controld_execd.c b/daemons/controld/controld_execd
index 530e4346c8..a90e8d833e 100644 index 530e4346c8..a90e8d833e 100644
--- a/daemons/controld/controld_execd.c --- a/daemons/controld/controld_execd.c
+++ b/daemons/controld/controld_execd.c +++ b/daemons/controld/controld_execd.c
@@ -1728,7 +1728,9 @@ @@ -1400,7 +1400,9 @@ metadata_complete(int pid, const pcmk__action_result_t *result, void *user_data)
md = controld_cache_metadata(lrm_state->metadata_cache, data->rsc, md = controld_cache_metadata(lrm_state->metadata_cache, data->rsc,
result->action_stdout); result->action_stdout);
} }
- do_lrm_rsc_op(lrm_state, data->rsc, data->input_xml, md); - do_lrm_rsc_op(lrm_state, data->rsc, data->input_xml, md);
+ if (!pcmk_is_set(fsa_input_register, R_HA_DISCONNECTED)) { + if (!pcmk_is_set(controld_globals.fsa_input_register, R_HA_DISCONNECTED)) {
+ do_lrm_rsc_op(lrm_state, data->rsc, data->input_xml, md); + do_lrm_rsc_op(lrm_state, data->rsc, data->input_xml, md);
+ } + }
free_metadata_cb_data(data); free_metadata_cb_data(data);
@ -44,7 +44,7 @@ diff --git a/daemons/controld/controld_execd_state.c b/daemons/controld/controld
index 8c68bfca08..4a87a9b332 100644 index 8c68bfca08..4a87a9b332 100644
--- a/daemons/controld/controld_execd_state.c --- a/daemons/controld/controld_execd_state.c
+++ b/daemons/controld/controld_execd_state.c +++ b/daemons/controld/controld_execd_state.c
@@ -131,12 +131,6 @@ @@ -132,12 +132,6 @@ lrm_state_create(const char *node_name)
return state; return state;
} }
@ -57,7 +57,7 @@ index 8c68bfca08..4a87a9b332 100644
static gboolean static gboolean
remote_proxy_remove_by_node(gpointer key, gpointer value, gpointer user_data) remote_proxy_remove_by_node(gpointer key, gpointer value, gpointer user_data)
{ {
@@ -764,7 +758,7 @@ @@ -799,7 +793,7 @@ lrm_state_unregister_rsc(lrm_state_t * lrm_state,
} }
if (is_remote_lrmd_ra(NULL, NULL, rsc_id)) { if (is_remote_lrmd_ra(NULL, NULL, rsc_id)) {
@ -70,18 +70,18 @@ diff --git a/daemons/controld/controld_lrm.h b/daemons/controld/controld_lrm.h
index 25f3db3316..c3113e49c3 100644 index 25f3db3316..c3113e49c3 100644
--- a/daemons/controld/controld_lrm.h --- a/daemons/controld/controld_lrm.h
+++ b/daemons/controld/controld_lrm.h +++ b/daemons/controld/controld_lrm.h
@@ -114,11 +114,6 @@ @@ -108,11 +108,6 @@ gboolean lrm_state_init_local(void);
lrm_state_t *lrm_state_create(const char *node_name); */
void lrm_state_destroy_all(void);
/*! -/*!
- * \brief Destroy executor connection by node name - * \brief Destroy executor connection by node name
- */ - */
-void lrm_state_destroy(const char *node_name); -void lrm_state_destroy(const char *node_name);
- -
-/*! /*!
* \brief Find lrm_state data by node name * \brief Find lrm_state data by node name
*/ */
lrm_state_t *lrm_state_find(const char *node_name);
From 1b915f1ce38756431f7faa142565e3e07aade194 Mon Sep 17 00:00:00 2001 From 1b915f1ce38756431f7faa142565e3e07aade194 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com> From: Ken Gaillot <kgaillot@redhat.com>
@ -98,7 +98,7 @@ diff --git a/daemons/controld/controld_execd_state.c b/daemons/controld/controld
index 4a87a9b332..b90cc5e635 100644 index 4a87a9b332..b90cc5e635 100644
--- a/daemons/controld/controld_execd_state.c --- a/daemons/controld/controld_execd_state.c
+++ b/daemons/controld/controld_execd_state.c +++ b/daemons/controld/controld_execd_state.c
@@ -246,7 +246,7 @@ @@ -301,7 +301,7 @@ lrm_state_destroy_all(void)
lrm_state_t * lrm_state_t *
lrm_state_find(const char *node_name) lrm_state_find(const char *node_name)
{ {
@ -107,7 +107,7 @@ index 4a87a9b332..b90cc5e635 100644
return NULL; return NULL;
} }
return g_hash_table_lookup(lrm_state_table, node_name); return g_hash_table_lookup(lrm_state_table, node_name);
@@ -257,6 +257,8 @@ @@ -312,6 +312,8 @@ lrm_state_find_or_create(const char *node_name)
{ {
lrm_state_t *lrm_state; lrm_state_t *lrm_state;
@ -116,7 +116,7 @@ index 4a87a9b332..b90cc5e635 100644
lrm_state = g_hash_table_lookup(lrm_state_table, node_name); lrm_state = g_hash_table_lookup(lrm_state_table, node_name);
if (!lrm_state) { if (!lrm_state) {
lrm_state = lrm_state_create(node_name); lrm_state = lrm_state_create(node_name);
@@ -268,6 +270,9 @@ @@ -323,6 +325,9 @@ lrm_state_find_or_create(const char *node_name)
GList * GList *
lrm_state_get_list(void) lrm_state_get_list(void)
{ {
@ -134,14 +134,14 @@ Subject: [PATCH 4/4] Log: controller: improve messages for resource history
updates updates
--- ---
daemons/controld/controld_execd.c | 11 +++++++++-- daemons/controld/controld_cib.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-) 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/daemons/controld/controld_execd.c b/daemons/controld/controld_execd.c diff --git a/daemons/controld/controld_cib.c b/daemons/controld/controld_cib.c
index 22ac42486f..c9dde0b748 100644 index 22ac42486f..c9dde0b748 100644
--- a/daemons/controld/controld_execd.c --- a/daemons/controld/controld_cib.c
+++ b/daemons/controld/controld_execd.c +++ b/daemons/controld/controld_cib.c
@@ -2408,10 +2408,17 @@ @@ -861,10 +861,17 @@ cib_rsc_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *use
case pcmk_ok: case pcmk_ok:
case -pcmk_err_diff_failed: case -pcmk_err_diff_failed:
case -pcmk_err_diff_resync: case -pcmk_err_diff_resync:
@ -160,4 +160,4 @@ index 22ac42486f..c9dde0b748 100644
+ } + }
} }
if (call_id == last_resource_update) { if (call_id == pending_rsc_update) {

@ -35,19 +35,13 @@
## Upstream pacemaker version, and its package version (specversion ## Upstream pacemaker version, and its package version (specversion
## can be incremented to build packages reliably considered "newer" ## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion) ## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.5 %global pcmkversion 2.1.6
%global specversion 9 %global specversion 8
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit a3f44794f94e1571c6ba0042915ade369b4ce4b1 %global commit 6fdc9deea294bbad629b003c6ae036aaed8e3ee0
## 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.
%if (0%{?fedora} >= 26) || (0%{?rhel} >= 9)
%global commit_abbrev 9 %global commit_abbrev 9
%else
%global commit_abbrev 7
%endif
## Nagios source control identifiers ## Nagios source control identifiers
%global nagios_name nagios-agents-metadata %global nagios_name nagios-agents-metadata
@ -248,12 +242,12 @@
Name: pacemaker Name: pacemaker
Summary: Scalable High-Availability cluster resource manager Summary: Scalable High-Availability cluster resource manager
Version: %{pcmkversion} Version: %{pcmkversion}
Release: %{pcmk_release}.3%{?dist} Release: %{pcmk_release}%{?dist}
%if %{defined _unitdir} %if %{defined _unitdir}
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
%else %else
# initscript is Revised BSD # initscript is Revised BSD
License: GPLv2+ and LGPLv2+ and BSD License: GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause
%endif %endif
Url: https://www.clusterlabs.org/ Url: https://www.clusterlabs.org/
@ -269,17 +263,15 @@ Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{arch
Source1: nagios-agents-metadata-%{nagios_hash}.tar.gz Source1: nagios-agents-metadata-%{nagios_hash}.tar.gz
# upstream commits # upstream commits
Patch001: 001-sync-points.patch Patch001: 001-remote-start-state.patch
Patch002: 002-remote-regression.patch Patch002: 002-group-colocation-constraint.patch
Patch003: 003-history-cleanup.patch Patch003: 003-clone-shuffle.patch
Patch004: 004-g_source_remove.patch Patch004: 004-clone-rsc-display.patch
Patch005: 005-query-null.patch Patch005: 005-attrd-dampen.patch
Patch006: 006-watchdog-fencing-topology.patch Patch006: 006-controller-reply.patch
Patch007: 007-attrd-dampen.patch Patch007: 007-glib-assertions.patch
Patch008: 008-controller-reply.patch Patch008: 008-attrd-shutdown.patch
Patch009: 009-glib-assertions.patch Patch009: 009-attrd-shutdown-2.patch
Patch010: 010-attrd-shutdown.patch
Patch011: 011-attrd-shutdown-2.patch
# downstream-only commits # downstream-only commits
#Patch1xx: 1xx-xxxx.patch #Patch1xx: 1xx-xxxx.patch
@ -304,6 +296,7 @@ ExclusiveArch: aarch64 i686 ppc64le s390x x86_64
Requires: %{python_path} Requires: %{python_path}
BuildRequires: %{python_name}-devel BuildRequires: %{python_name}-devel
BuildRequires: %{python_name}-setuptools
# Pacemaker requires a minimum libqb functionality # Pacemaker requires a minimum libqb functionality
Requires: libqb >= 0.17.0 Requires: libqb >= 0.17.0
@ -394,7 +387,7 @@ Available rpmbuild rebuild options:
stonithd stonithd
%package cli %package cli
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Command line tools for controlling Pacemaker clusters Summary: Command line tools for controlling Pacemaker clusters
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
# For crm_report # For crm_report
@ -414,7 +407,7 @@ to query and control the cluster from machines that may, or may not,
be part of the cluster. be part of the cluster.
%package -n %{pkgname_pcmk_libs} %package -n %{pkgname_pcmk_libs}
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Core Pacemaker libraries Summary: Core Pacemaker libraries
Requires(pre): %{pkgname_shadow_utils} Requires(pre): %{pkgname_shadow_utils}
Requires: %{name}-schemas = %{version}-%{release} Requires: %{name}-schemas = %{version}-%{release}
@ -431,7 +424,7 @@ The %{pkgname_pcmk_libs} package contains shared libraries needed for cluster
nodes and those just running the CLI tools. nodes and those just running the CLI tools.
%package cluster-libs %package cluster-libs
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Cluster Libraries used by Pacemaker Summary: Cluster Libraries used by Pacemaker
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
@ -442,12 +435,26 @@ manager.
The %{name}-cluster-libs package contains cluster-aware shared The %{name}-cluster-libs package contains cluster-aware shared
libraries needed for nodes that will form part of the cluster nodes. libraries needed for nodes that will form part of the cluster nodes.
%package -n %{python_name}-%{name}
License: LGPL-2.1-or-later
Summary: Python libraries for Pacemaker
Requires: %{python_path}
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
BuildArch: noarch
%description -n %{python_name}-%{name}
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
The %{python_name}-%{name} package contains a Python library that can be used
to interface with Pacemaker.
%package remote %package remote
%if %{defined _unitdir} %if %{defined _unitdir}
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
%else %else
# initscript is Revised BSD # initscript is Revised BSD
License: GPLv2+ and LGPLv2+ and BSD License: GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause
%endif %endif
Summary: Pacemaker remote executor daemon for non-cluster nodes Summary: Pacemaker remote executor daemon for non-cluster nodes
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
@ -470,7 +477,7 @@ which is capable of extending pacemaker functionality to remote
nodes not running the full corosync/cluster stack. nodes not running the full corosync/cluster stack.
%package -n %{pkgname_pcmk_libs}-devel %package -n %{pkgname_pcmk_libs}-devel
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Pacemaker development package Summary: Pacemaker development package
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
@ -493,11 +500,12 @@ The %{pkgname_pcmk_libs}-devel package contains headers and shared libraries
for developing tools for Pacemaker. for developing tools for Pacemaker.
%package cts %package cts
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Test framework for cluster-related technologies like Pacemaker Summary: Test framework for cluster-related technologies like Pacemaker
Requires: %{python_path} Requires: %{python_path}
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release}
Requires: %{python_name}-%{name} = %{version}-%{release}
Requires: %{pkgname_procps} Requires: %{pkgname_procps}
Requires: psmisc Requires: psmisc
Requires: %{python_name}-psutil Requires: %{python_name}-psutil
@ -525,7 +533,7 @@ Pacemaker is an advanced, scalable High-Availability cluster resource
manager. manager.
%package schemas %package schemas
License: GPLv2+ License: GPL-2.0-or-later
Summary: Schemas and upgrade stylesheets for Pacemaker Summary: Schemas and upgrade stylesheets for Pacemaker
BuildArch: noarch BuildArch: noarch
@ -607,6 +615,10 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{_smp_mflags} V=1 make %{_smp_mflags} V=1
pushd python
%py3_build
popd
%check %check
make %{_smp_mflags} check make %{_smp_mflags} check
{ cts/cts-scheduler --run load-stopped-loop \ { cts/cts-scheduler --run load-stopped-loop \
@ -625,6 +637,10 @@ make install \
DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \ DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \
%{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}} %{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}}
pushd python
%py3_install
popd
%if %{with upstart_job} %if %{with upstart_job}
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/init mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/init
install -m 644 pacemakerd/pacemaker.upstart ${RPM_BUILD_ROOT}%{_sysconfdir}/init/pacemaker.conf install -m 644 pacemakerd/pacemaker.upstart ${RPM_BUILD_ROOT}%{_sysconfdir}/init/pacemaker.conf
@ -875,17 +891,21 @@ exit 0
%dir %{ocf_root}/resource.d %dir %{ocf_root}/resource.d
%{ocf_root}/resource.d/pacemaker %{ocf_root}/resource.d/pacemaker
%doc %{_mandir}/man7/* %doc %{_mandir}/man7/*pacemaker*
%exclude %{_mandir}/man7/pacemaker-controld.* %exclude %{_mandir}/man7/pacemaker-controld.*
%exclude %{_mandir}/man7/pacemaker-schedulerd.* %exclude %{_mandir}/man7/pacemaker-schedulerd.*
%exclude %{_mandir}/man7/pacemaker-fenced.* %exclude %{_mandir}/man7/pacemaker-fenced.*
%exclude %{_mandir}/man7/ocf_pacemaker_controld.* %exclude %{_mandir}/man7/ocf_pacemaker_controld.*
%exclude %{_mandir}/man7/ocf_pacemaker_remote.* %exclude %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/* %doc %{_mandir}/man8/crm*.8.gz
%exclude %{_mandir}/man8/crm_master.* %exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_watchdog.* %doc %{_mandir}/man8/attrd_updater.*
%exclude %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/cibadmin.*
%exclude %{_mandir}/man8/pacemaker-remoted.* %if %{with cibsecrets}
%doc %{_mandir}/man8/cibsecret.*
%endif
%doc %{_mandir}/man8/iso8601.*
%doc %{_mandir}/man8/stonith_admin.*
%license licenses/GPLv2 %license licenses/GPLv2
%doc COPYING %doc COPYING
@ -916,6 +936,14 @@ exit 0
%doc COPYING %doc COPYING
%doc ChangeLog %doc ChangeLog
%files -n %{python_name}-%{name}
%{python3_sitelib}/pacemaker/
%{python3_sitelib}/pacemaker-*.egg-info
%exclude %{python3_sitelib}/pacemaker/_cts/
%license licenses/LGPLv2.1
%doc COPYING
%doc ChangeLog
%files remote %files remote
%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
%if %{defined _unitdir} %if %{defined _unitdir}
@ -941,6 +969,7 @@ exit 0
%files cts %files cts
%{python_site}/cts %{python_site}/cts
%{python3_sitelib}/pacemaker/_cts/
%{_datadir}/pacemaker/tests %{_datadir}/pacemaker/tests
%{_libexecdir}/pacemaker/cts-log-watcher %{_libexecdir}/pacemaker/cts-log-watcher
@ -952,8 +981,16 @@ exit 0
%files -n %{pkgname_pcmk_libs}-devel %files -n %{pkgname_pcmk_libs}-devel
%{_includedir}/pacemaker %{_includedir}/pacemaker
%{_libdir}/*.so %{_libdir}/libcib.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/liblrmd.so
%{_libdir}/libcrmservice.so
%{_libdir}/libcrmcommon.so
%{_libdir}/libpe_status.so
%{_libdir}/libpe_rules.so
%{_libdir}/libpacemaker.so
%{_libdir}/libstonithd.so
%{_libdir}/libcrmcluster.so
%{_libdir}/pkgconfig/*pacemaker*.pc
%license licenses/LGPLv2.1 %license licenses/LGPLv2.1
%doc COPYING %doc COPYING
%doc ChangeLog %doc ChangeLog
@ -973,24 +1010,52 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING %license %{nagios_name}-%{nagios_hash}/COPYING
%changelog %changelog
* Wed Aug 30 2023 Chris Lumens <clumens@redhat.com> - 2.1.5-9.3 * Tue Aug 29 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-8
- Fix an additional shutdown race between attrd and the controller - Fix an additional shutdown race between attrd and the controller
- Related: rhbz2229013 - Related: rhbz2228955
* Tue Aug 8 2023 Chris Lumens <clumens@redhat.com> - 2.1.5-8.3 * Mon Aug 7 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-7
- Fix attrd race condition when shutting down - Fix attrd race condition when shutting down
- Resolves: rhbz2229013 - Resolves: rhbz2228955
* Wed Aug 2 2023 Chris Lumens <clumens@redhat.com> - 2.1.5-8.2 * Thu Jul 27 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-6
- Apply dampening when creating attributes with attrd_updater -U
- Wait for a reply from various controller commands - Wait for a reply from various controller commands
- Resolves: rhbz2224070 - Resolves: rhbz2225631
- Resolves: rhbz2225668 - Related: rhbz2189300
* Fri May 5 2023 Klaus Wenninger <kwenning@redhat.com> - 2.1.5-8.1 * Tue Jul 25 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-5
- Fix overall timeout calculation if watchdog and another fencing - Apply dampening when creating attributes with attrd_updater -U
device share a topology level - Resolves: rhbz2224046
- Resolves: rhbz2187419 - Related: rhbz2189300
* Wed Jul 19 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-4
- Clone instances should not shuffle unnecessarily
- Fix a bug in clone resource description display
- Resolves: rhbz1931023
- Resolves: rhbz1688149
- Related: rhbz2106642
- Related: rhbz2189300
* Mon Jul 10 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-3
- Fix moving groups when there's a constraint for a single group member
- Resolves: rhbz2218232
- Resolves: rhbz2189300
* Wed Jun 21 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-2
- Support start state for Pacemaker Remote nodes
- Resolves: rhbz1502795
* Thu May 25 2023 Chris Lumens <clumens@redhat.com> - 2.1.6-1
- Rebase pacemaker on upstream 2.1.6 final release
- Resolves: rhbz1578820
- Resolves: rhbz1632951
- Resolves: rhbz1876173
- Resolves: rhbz2010084
- Resolves: rhbz2030869
- Resolves: rhbz2078611
- Resolves: rhbz2106642
- Resolves: rhbz2160206
- Resolves: rhbz2168633
* Wed Feb 22 2023 Chris Lumens <clumens@redhat.com> - 2.1.5-8 * Wed Feb 22 2023 Chris Lumens <clumens@redhat.com> - 2.1.5-8
- Rebuild with new release due to build system problems - Rebuild with new release due to build system problems

Loading…
Cancel
Save