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

Index: pacemaker/lib/pengine/utils.c
===================================================================
--- pacemaker.orig/lib/pengine/utils.c
+++ pacemaker/lib/pengine/utils.c
@@ -1060,7 +1060,7 @@ print_str_str(gpointer key, gpointer val
 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>",
Index: pacemaker/tools/crm_mon.c
===================================================================
--- pacemaker.orig/tools/crm_mon.c
+++ pacemaker/tools/crm_mon.c
@@ -99,7 +99,7 @@ gboolean print_tickets = FALSE;
 gboolean watch_fencing = FALSE;
 gboolean hide_headers = 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? */
@@ -349,7 +349,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" },
Index: pacemaker/tools/crm_resource.c
===================================================================
--- pacemaker.orig/tools/crm_resource.c
+++ pacemaker/tools/crm_resource.c
@@ -68,7 +68,7 @@ char *xml_file = NULL;
 int cib_options = cib_sync_call;
 int crmd_replies_needed = 1; /* The welcome message */
 GMainLoop *mainloop = NULL;
-gboolean print_pending = FALSE;
+gboolean print_pending = TRUE;
 
 extern void cleanup_alloc_calculations(pe_working_set_t * data_set);
 
@@ -2040,8 +2040,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"},
Index: pacemaker/tools/crm_simulate.c
===================================================================
--- pacemaker.orig/tools/crm_simulate.c
+++ pacemaker/tools/crm_simulate.c
@@ -39,7 +39,7 @@
 cib_t *global_cib = NULL;
 GListPtr op_fail = NULL;
 gboolean quiet = FALSE;
-gboolean print_pending = FALSE;
+gboolean print_pending = TRUE;
 char *temp_shadow = NULL;
 extern gboolean bringing_nodes_online;
 
@@ -444,7 +444,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"},
