diff --git a/SOURCES/026-initialize-var.patch b/SOURCES/026-initialize-var.patch new file mode 100644 index 0000000..235c564 --- /dev/null +++ b/SOURCES/026-initialize-var.patch @@ -0,0 +1,34 @@ +From 40fbb833dfd0efa482303f741211c61536f9e4e2 Mon Sep 17 00:00:00 2001 +From: Ken Gaillot +Date: Tue, 5 May 2020 15:54:28 -0500 +Subject: [PATCH] Fix: controller: properly detect remote node info requests + +This fixes a regression introduced in 1.1.19 / 2.0.0 + +Ironically the original change was intended to make crm_node -n work reliably +on Pacemaker Remote nodes (even when the node name in the cluster differed from +the local hostname). However, the remote request might not be detected +appropriately depending on what the value of an uninitialized variable happened +to be. + +The fix is to initialize the variable. +--- + daemons/controld/controld_execd_state.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemons/controld/controld_execd_state.c b/daemons/controld/controld_execd_state.c +index 9f30a4e..2d3268a 100644 +--- a/daemons/controld/controld_execd_state.c ++++ b/daemons/controld/controld_execd_state.c +@@ -540,7 +540,7 @@ crmd_remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) + */ + if (safe_str_eq(crm_element_value(request, F_CRM_TASK), + CRM_OP_NODE_INFO)) { +- int node_id; ++ int node_id = 0; + + crm_element_value_int(request, XML_ATTR_ID, &node_id); + if ((node_id <= 0) +-- +1.8.3.1 + diff --git a/SPECS/pacemaker.spec b/SPECS/pacemaker.spec index c74ff9c..d54e8d9 100644 --- a/SPECS/pacemaker.spec +++ b/SPECS/pacemaker.spec @@ -240,7 +240,7 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager Version: %{pcmkversion} -Release: %{pcmk_release}%{?dist} +Release: %{pcmk_release}%{?dist}.1 %if %{defined _unitdir} License: GPLv2+ and LGPLv2+ %else @@ -281,6 +281,7 @@ Patch22: 022-shutdown-lock.patch Patch23: 023-curses.patch Patch24: 024-crm_mon-cgi.patch Patch25: 025-clear-attrs.patch +Patch26: 026-initialize-var.patch # downstream-only commits #Patch100: xxx.patch @@ -295,7 +296,7 @@ Requires: psmisc %endif %{?systemd_requires} -ExclusiveArch: aarch64 i686 ppc64le s390x x86_64 %{arm} +ExclusiveArch: aarch64 i686 ppc64le s390x x86_64 Requires: %{python_path} BuildRequires: %{python_name}-devel @@ -968,6 +969,10 @@ exit 0 %license %{nagios_name}-%{nagios_hash}/COPYING %changelog +* Wed May 13 2020 Ken Gaillot - 2.0.3-5.1 +- Fix regression when running "crm_node -n" on remote nodes +- Resolves: rhbz1833384 + * Mon Jan 27 2020 Ken Gaillot - 2.0.3-5 - Clear leaving node's attributes if there is no DC - Resolves: rhbz1791841