From b48ceeb041cee65a9b93b9b76235e475fa1a128f Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 16 Oct 2017 09:45:18 -0500
Subject: [PATCH 2/2] Feature: crmd: default record-pending to TRUE
---
crmd/lrm.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/crmd/lrm.c b/crmd/lrm.c
index eb4e16e..36dc076 100644
--- a/crmd/lrm.c
+++ b/crmd/lrm.c
@@ -2061,25 +2061,22 @@ stop_recurring_actions(gpointer key, gpointer value, gpointer user_data)
static void
record_pending_op(const char *node_name, lrmd_rsc_info_t *rsc, lrmd_event_data_t *op)
{
+ const char *record_pending = NULL;
+
CRM_CHECK(node_name != NULL, return);
CRM_CHECK(rsc != NULL, return);
CRM_CHECK(op != NULL, return);
// Never record certain operation types as pending
- if (op->op_type == NULL
+ if ((op->op_type == NULL) || (op->params == NULL)
|| !controld_action_is_recordable(op->op_type)) {
return;
}
- if (op->params == NULL) {
+ // defaults to true
+ record_pending = crm_meta_value(op->params, XML_OP_ATTR_PENDING);
+ if (record_pending && !crm_is_true(record_pending)) {
return;
-
- } else {
- const char *record_pending = crm_meta_value(op->params, XML_OP_ATTR_PENDING);
-
- if (record_pending == NULL || crm_is_true(record_pending) == FALSE) {
- return;
- }
}
op->call_id = -1;
--
1.8.3.1