|
|
109fe2 |
From d0278eca6f2f8d4e707f73d12b4f8161f07e42fe Mon Sep 17 00:00:00 2001
|
|
|
109fe2 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
109fe2 |
Date: Thu, 2 Nov 2017 18:26:03 -0500
|
|
|
109fe2 |
Subject: [PATCH 1/2] Feature: tools: enable new crm_resource
|
|
|
109fe2 |
--cleanup/--refresh behavior
|
|
|
109fe2 |
|
|
|
109fe2 |
it was temporarily disabled by 3576364
|
|
|
109fe2 |
---
|
|
|
109fe2 |
tools/crm_resource.c | 6 +-----
|
|
|
109fe2 |
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
|
109fe2 |
|
|
|
109fe2 |
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
|
|
|
109fe2 |
index 92255df..356bb05 100644
|
|
|
109fe2 |
--- a/tools/crm_resource.c
|
|
|
109fe2 |
+++ b/tools/crm_resource.c
|
|
|
109fe2 |
@@ -212,14 +212,11 @@ static struct crm_option long_options[] = {
|
|
|
109fe2 |
},
|
|
|
109fe2 |
{
|
|
|
109fe2 |
"cleanup", no_argument, NULL, 'C',
|
|
|
109fe2 |
-#if 0
|
|
|
109fe2 |
- // new behavior disabled until 2.0.0
|
|
|
109fe2 |
"\t\tDelete failed operations from a resource's history allowing its current state to be rechecked.\n"
|
|
|
109fe2 |
"\t\t\t\tOptionally filtered by --resource, --node, --operation, and --interval (otherwise all).\n"
|
|
|
109fe2 |
},
|
|
|
109fe2 |
{
|
|
|
109fe2 |
"refresh", no_argument, NULL, 'R',
|
|
|
109fe2 |
-#endif
|
|
|
109fe2 |
"\t\tDelete resource's history (including failures) so its current state is rechecked.\n"
|
|
|
109fe2 |
"\t\t\t\tOptionally filtered by --resource, --node, --operation, and --interval (otherwise all).\n"
|
|
|
109fe2 |
"\t\t\t\tUnless --force is specified, resource's group or clone (if any) will also be cleaned"
|
|
|
109fe2 |
@@ -384,7 +381,6 @@ static struct crm_option long_options[] = {
|
|
|
109fe2 |
{"un-migrate", no_argument, NULL, 'U', NULL, pcmk_option_hidden},
|
|
|
109fe2 |
{"un-move", no_argument, NULL, 'U', NULL, pcmk_option_hidden},
|
|
|
109fe2 |
|
|
|
109fe2 |
- {"refresh", 0, 0, 'R', NULL, pcmk_option_hidden}, // remove this line for 2.0.0
|
|
|
109fe2 |
{"reprobe", no_argument, NULL, 'P', NULL, pcmk_option_hidden},
|
|
|
109fe2 |
|
|
|
109fe2 |
{"-spacer-", 1, NULL, '-', "\nExamples:", pcmk_option_paragraph},
|
|
|
109fe2 |
@@ -645,7 +641,7 @@ main(int argc, char **argv)
|
|
|
109fe2 |
if (cib_file == NULL) {
|
|
|
109fe2 |
require_crmd = TRUE;
|
|
|
109fe2 |
}
|
|
|
109fe2 |
- just_errors = FALSE; // disable until 2.0.0
|
|
|
109fe2 |
+ just_errors = TRUE;
|
|
|
109fe2 |
rsc_cmd = 'C';
|
|
|
109fe2 |
find_flags = pe_find_renamed|pe_find_anon;
|
|
|
109fe2 |
break;
|
|
|
109fe2 |
--
|
|
|
109fe2 |
1.8.3.1
|
|
|
109fe2 |
|
|
|
109fe2 |
|
|
|
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 |
|
|
|
109fe2 |
- if (op->op_type == NULL
|
|
|
109fe2 |
+ if ((op->op_type == NULL) || (op->params == NULL)
|
|
|
109fe2 |
|| safe_str_eq(op->op_type, CRMD_ACTION_CANCEL)
|
|
|
109fe2 |
|| safe_str_eq(op->op_type, CRMD_ACTION_DELETE)) {
|
|
|
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 |
|