File bsc#1186693-clean-attrd-attributes-when-remote-node-is-up.patch of Package pacemaker.26927
From ea9e5e6176e03083857257cce96db2fd5d6a807e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= <jvanz@jvanz.com>
Date: Thu, 17 Jun 2021 10:45:35 -0300
Subject: [PATCH] Purge remote node attribute when the node is up.
When a remote node is up again after being killed, cleans the attrd's
cache for the node. This is necessary to ensure that the CIB and the
attrd cache will match. Otherwise, when the node is up the cache will be
populated with the values from other nodes (e.g. transient attributes)
and the attributes will be clean from the CIB. Causing a discrepancy
among these data sources.
---
crmd/remote_lrmd_ra.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: pacemaker-1.1.18+20180430.b12c320f5/crmd/remote_lrmd_ra.c
===================================================================
--- pacemaker-1.1.18+20180430.b12c320f5.orig/crmd/remote_lrmd_ra.c
+++ pacemaker-1.1.18+20180430.b12c320f5/crmd/remote_lrmd_ra.c
@@ -186,6 +186,9 @@ remote_node_up(const char *node_name)
CRM_CHECK(node_name != NULL, return);
crm_info("Announcing pacemaker_remote node %s", node_name);
+ /* Purge node from attrd's memory */
+ update_attrd_remote_node_removed(node_name, NULL);
+
/* Clear node's operation history. The node's transient attributes should
* and normally will be cleared when the node leaves, but since remote node
* state has a number of corner cases, clear them here as well, to be sure.
@@ -1068,7 +1071,7 @@ handle_dup:
recurring_helper(cmd);
}
- return cmd;
+ return cmd;
}
int