From ad6414e38d1eb74fff3f5b59322d518fb13adb57 Mon Sep 17 00:00:00 2001
From: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Date: Tue, 28 Apr 2020 08:15:19 +0900
Subject: [PATCH] High : cotrold: Notify tengine of completion of
CRM_OP_LRM_DELETE.(Fix:CLBZ:#5424)
---
crmd/messages.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/crmd/messages.c b/crmd/messages.c
index 62719ad..0b063bc 100644
--- a/crmd/messages.c
+++ b/crmd/messages.c
@@ -685,13 +685,20 @@ handle_lrm_delete(xmlNode *stored_msg)
crmd_cib_smart_opt());
}
- // Notify client if not from graph (compare with notify_deleted())
- if (from_sys && strcmp(from_sys, CRM_SYSTEM_TENGINE)) {
+ //Notify client and tengine.(Only notify tengine if mode = "cib" and CRM_OP_LRM_DELETE.)
+ if (from_sys) {
lrmd_event_data_t *op = NULL;
const char *from_host = crm_element_value(stored_msg,
F_CRM_HOST_FROM);
- const char *transition = crm_element_value(msg_data,
+ const char *transition;
+
+ if (strcmp(from_sys, CRM_SYSTEM_TENGINE)) {
+ transition = crm_element_value(msg_data,
+ XML_ATTR_TRANSITION_KEY);
+ } else {
+ transition = crm_element_value(stored_msg,
XML_ATTR_TRANSITION_KEY);
+ }
crm_info("Notifying %s on %s that %s was%s deleted",
from_sys, (from_host? from_host : "local node"), rsc_id,
--
1.8.3.1