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