Blame SOURCES/026-initialize-var.patch
|
|
6a8542 |
From 40fbb833dfd0efa482303f741211c61536f9e4e2 Mon Sep 17 00:00:00 2001
|
|
|
6a8542 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
6a8542 |
Date: Tue, 5 May 2020 15:54:28 -0500
|
|
|
6a8542 |
Subject: [PATCH] Fix: controller: properly detect remote node info requests
|
|
|
6a8542 |
|
|
|
6a8542 |
This fixes a regression introduced in 1.1.19 / 2.0.0
|
|
|
6a8542 |
|
|
|
6a8542 |
Ironically the original change was intended to make crm_node -n work reliably
|
|
|
6a8542 |
on Pacemaker Remote nodes (even when the node name in the cluster differed from
|
|
|
6a8542 |
the local hostname). However, the remote request might not be detected
|
|
|
6a8542 |
appropriately depending on what the value of an uninitialized variable happened
|
|
|
6a8542 |
to be.
|
|
|
6a8542 |
|
|
|
6a8542 |
The fix is to initialize the variable.
|
|
|
6a8542 |
---
|
|
|
6a8542 |
daemons/controld/controld_execd_state.c | 2 +-
|
|
|
6a8542 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6a8542 |
|
|
|
6a8542 |
diff --git a/daemons/controld/controld_execd_state.c b/daemons/controld/controld_execd_state.c
|
|
|
6a8542 |
index 9f30a4e..2d3268a 100644
|
|
|
6a8542 |
--- a/daemons/controld/controld_execd_state.c
|
|
|
6a8542 |
+++ b/daemons/controld/controld_execd_state.c
|
|
|
6a8542 |
@@ -540,7 +540,7 @@ crmd_remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg)
|
|
|
6a8542 |
*/
|
|
|
6a8542 |
if (safe_str_eq(crm_element_value(request, F_CRM_TASK),
|
|
|
6a8542 |
CRM_OP_NODE_INFO)) {
|
|
|
6a8542 |
- int node_id;
|
|
|
6a8542 |
+ int node_id = 0;
|
|
|
6a8542 |
|
|
|
6a8542 |
crm_element_value_int(request, XML_ATTR_ID, &node_id);
|
|
|
6a8542 |
if ((node_id <= 0)
|
|
|
6a8542 |
--
|
|
|
6a8542 |
1.8.3.1
|
|
|
6a8542 |
|