From 29cbb5d0165397be01a8f54147d2e147d83a5798 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Fri, 5 Aug 2016 16:49:30 -0500
Subject: [PATCH] Fix: crmd: clear remote node operation history only when it
comes up
---
crmd/remote_lrmd_ra.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c
index c347bb1..02218eb 100644
--- a/crmd/remote_lrmd_ra.c
+++ b/crmd/remote_lrmd_ra.c
@@ -178,10 +178,9 @@ remote_node_up(const char *node_name)
CRM_CHECK(node_name != NULL, return);
crm_info("Announcing pacemaker_remote node %s", node_name);
- /* Clear node's operation history and transient attributes.
- * This should and normally will be done when the node leaves,
- * but since remote node state has a number of corner cases,
- * we additionally clear it on startup to be sure.
+ /* 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.
*/
call_opt = crmd_cib_smart_opt();
erase_status_tag(node_name, XML_CIB_TAG_LRM, call_opt);
@@ -243,8 +242,7 @@ remote_node_down(const char *node_name)
/* Purge node from attrd's memory */
update_attrd_remote_node_removed(node_name, NULL);
- /* Purge node's operation history and transient attributes from CIB */
- erase_status_tag(node_name, XML_CIB_TAG_LRM, call_opt);
+ /* Purge node's transient attributes */
erase_status_tag(node_name, XML_TAG_TRANSIENT_NODEATTRS, call_opt);
/* Ensure node is in the remote peer cache with lost state */
--
1.8.3.1