File bug-986201_pacemaker-pengine-tools-print-pending-state.patch of Package pacemaker.3577
commit abac548708b6b59fe7526521422d248132cdddb2
Author: Gao,Yan <ygao@suse.com>
Date: Fri Jun 17 11:39:40 2016 +0200
Feature: pengine,tools: Display pending resource state by default when it's available
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
index 7941440..209f34c 100644
--- a/lib/pengine/utils.c
+++ b/lib/pengine/utils.c
@@ -1067,7 +1067,7 @@ print_str_str(gpointer key, gpointer value, gpointer user_data)
void
print_resource(int log_level, const char *pre_text, resource_t * rsc, gboolean details)
{
- long options = pe_print_log;
+ long options = pe_print_log | pe_print_pending;
if (rsc == NULL) {
do_crm_log(log_level - 1, "%s%s: <NULL>",
diff --git a/tools/crm_mon.c b/tools/crm_mon.c
index 5646903..41763fd 100644
--- a/tools/crm_mon.c
+++ b/tools/crm_mon.c
@@ -126,7 +126,7 @@ gboolean has_warnings = FALSE;
gboolean print_timing = FALSE;
gboolean watch_fencing = FALSE;
gboolean print_brief = FALSE;
-gboolean print_pending = FALSE;
+gboolean print_pending = TRUE;
gboolean print_clone_detail = FALSE;
/* FIXME allow, detect, and correctly interpret glob pattern or regex? */
@@ -379,7 +379,7 @@ static struct crm_option long_options[] = {
{"hide-headers", 0, 0, 'D', "\tHide all headers" },
{"show-detail", 0, 0, 'R', "\tShow more details (node IDs, individual clone instances)" },
{"brief", 0, 0, 'b', "\t\tBrief output" },
- {"pending", 0, 0, 'j', "\t\tDisplay pending state if 'record-pending' is enabled" },
+ {"pending", 0, 0, 'j', "\t\tDisplay pending state if 'record-pending' is enabled", pcmk_option_hidden},
{"-spacer-", 1, 0, '-', "\nAdditional Options:"},
{"interval", 1, 0, 'i', "\tUpdate frequency in seconds" },
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index eb0f88b..450abd1 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -112,8 +112,8 @@ static struct crm_option long_options[] = {
{"list-raw", 0, 0, 'l', "\tList the IDs of all instantiated resources (no groups/clones/...)"},
{"list-cts", 0, 0, 'c', NULL, pcmk_option_hidden},
{"list-operations", 0, 0, 'O', "\tList active resource operations. Optionally filtered by resource (-r) and/or node (-N)"},
- {"list-all-operations", 0, 0, 'o', "List all resource operations. Optionally filtered by resource (-r) and/or node (-N)"},
- {"pending", 0, 0, 'j', "\t\tDisplay pending state if 'record-pending' is enabled\n"},
+ {"list-all-operations", 0, 0, 'o', "List all resource operations. Optionally filtered by resource (-r) and/or node (-N)\n"},
+ {"pending", 0, 0, 'j', "\t\tDisplay pending state if 'record-pending' is enabled\n", pcmk_option_hidden},
{"list-standards", 0, 0, 0, "\tList supported standards"},
{"list-ocf-providers", 0, 0, 0, "List all available OCF providers"},
diff --git a/tools/crm_resource_print.c b/tools/crm_resource_print.c
index 946b9e3..5e84723 100644
--- a/tools/crm_resource_print.c
+++ b/tools/crm_resource_print.c
@@ -19,7 +19,7 @@
#include <crm_resource.h>
-bool print_pending = FALSE;
+bool print_pending = TRUE;
#define cons_string(x) x?x:"NA"
void
diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c
index e870688..96fea53 100644
--- a/tools/crm_simulate.c
+++ b/tools/crm_simulate.c
@@ -40,7 +40,7 @@ cib_t *global_cib = NULL;
GListPtr op_fail = NULL;
bool action_numbers = FALSE;
gboolean quiet = FALSE;
-gboolean print_pending = FALSE;
+gboolean print_pending = TRUE;
char *temp_shadow = NULL;
extern gboolean bringing_nodes_online;
@@ -468,7 +468,7 @@ static struct crm_option long_options[] = {
{"show-scores", 0, 0, 's', "Show allocation scores"},
{"show-utilization", 0, 0, 'U', "Show utilization information"},
{"profile", 1, 0, 'P', "Run all tests in the named directory to create profiling data"},
- {"pending", 0, 0, 'j', "\tDisplay pending state if 'record-pending' is enabled"},
+ {"pending", 0, 0, 'j', "\tDisplay pending state if 'record-pending' is enabled", pcmk_option_hidden},
{"-spacer-", 0, 0, '-', "\nSynthetic Cluster Events:"},
{"node-up", 1, 0, 'u', "\tBring a node online"},