17 #include <libxml/tree.h>    24                    gboolean dependents) {
    31                                        rsc->
id, score, dependents ? 
"needs" : 
"with",
    35                                    rsc->
id, score, cons->
id);
    46     xmlNodePtr node = NULL;
    80     for (lpc = list; lpc != NULL; lpc = lpc->next) {
    85         for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
   111                   "pe_node_t *", 
"pe_node_t *", 
"pe_action_t *",
   116     const char *change = va_arg(args, 
const char *);
   125     char *details = NULL;
   126     bool same_host = FALSE;
   127     bool same_role = FALSE;
   128     bool need_role = FALSE;
   130     static int rsc_width = 5;
   131     static int detail_width = 5;
   134     CRM_ASSERT(destination != NULL || origin != NULL);
   140     len = strlen(rsc->
id);
   141     if(len > rsc_width) {
   150     if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
   158     if (need_role && (origin == NULL)) {
   162     } 
else if (origin == NULL) {
   166     } 
else if (need_role && (destination == NULL)) {
   170     } 
else if (destination == NULL) {
   174     } 
else if (need_role && same_role && same_host) {
   178     } 
else if (same_role && same_host) {
   182     } 
else if (need_role && same_role) {
   186     } 
else if (same_role) {
   190     } 
else if (same_host) {
   199     len = strlen(details);
   200     if(len > detail_width) {
   207     } 
else if(source->
reason) {
   211         reason = strdup(
"blocked");
   215     out->list_item(out, NULL, 
"%-8s   %-*s   ( %*s )%s%s", change, rsc_width,
   216                    rsc->
id, detail_width, details, reason ? 
"  " : 
"", reason ? reason : 
"");
   224                   "pe_node_t *", 
"pe_node_t *", 
"pe_action_t *",
   229     const char *change = va_arg(args, 
const char *);
   236     char *change_str = NULL;
   238     bool same_host = FALSE;
   239     bool same_role = FALSE;
   240     bool need_role = FALSE;
   244     CRM_ASSERT(destination != NULL || origin != NULL);
   246     if (source == NULL) {
   255     if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
   263     change_str = g_ascii_strdown(change, -1);
   265                                        "action", change_str,
   270     if (need_role && (origin == NULL)) {
   278     } 
else if (origin == NULL) {
   282     } 
else if (need_role && (destination == NULL)) {
   289     } 
else if (destination == NULL) {
   293     } 
else if (need_role && same_role && same_host) {
   300     } 
else if (same_role && same_host) {
   304     } 
else if (need_role && same_role) {
   312     } 
else if (same_role) {
   319     } 
else if (same_host) {
   343     } 
else if(source->
reason) {
   358     gboolean recursive = va_arg(args, gboolean);
   367     for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
   374             out->list_item(out, NULL, 
"%s (id=%s - loop)",
   379         hdr = colocations_header(cons->
primary, cons, FALSE);
   380         out->list_item(out, NULL, 
"%s", hdr);
   384         out->begin_list(out, NULL, NULL, NULL);
   386         out->message(out, 
"locations-list", cons->
primary);
   388             out->message(out, 
"rsc-is-colocated-with-list",
   401 rsc_is_colocated_with_list_xml(
pcmk__output_t *out, va_list args) {
   403     gboolean recursive = va_arg(args, gboolean);
   412     for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
   416             colocations_xml_node(out, cons->
primary, cons);
   420         colocations_xml_node(out, cons->
primary, cons);
   421         do_locations_list_xml(out, cons->
primary, 
false);
   424             out->message(out, 
"rsc-is-colocated-with-list",
   436     gboolean recursive = va_arg(args, gboolean);
   445     for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
   452             out->list_item(out, NULL, 
"%s (id=%s - loop)",
   457         hdr = colocations_header(cons->
dependent, cons, TRUE);
   458         out->list_item(out, NULL, 
"%s", hdr);
   462         out->begin_list(out, NULL, NULL, NULL);
   464         out->message(out, 
"locations-list", cons->
dependent);
   466             out->message(out, 
"rscs-colocated-with-list",
   481     gboolean recursive = va_arg(args, gboolean);
   490     for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
   494             colocations_xml_node(out, cons->
dependent, cons);
   498         colocations_xml_node(out, cons->
dependent, cons);
   499         do_locations_list_xml(out, cons->
dependent, 
false);
   502             out->message(out, 
"rscs-colocated-with-list",
   519     for (lpc = list; lpc != NULL; lpc = lpc->next) {
   524         for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
   529             out->list_item(out, NULL, 
"Node %s (score=%s, id=%s, rsc=%s)",
   543     return do_locations_list_xml(out, rsc, 
true);
   546 PCMK__OUTPUT_ARGS(
"stacks-constraints", 
"pe_resource_t *", 
"pe_working_set_t *", 
"gboolean")
   551     gboolean recursive = va_arg(args, gboolean);
   558     out->message(out, 
"locations-list", rsc);
   561     out->message(out, 
"rscs-colocated-with-list", rsc, recursive);
   564     out->message(out, 
"rsc-is-colocated-with-list", rsc, recursive);
   568 PCMK__OUTPUT_ARGS(
"stacks-constraints", 
"pe_resource_t *", 
"pe_working_set_t *", 
"gboolean")
   573     gboolean recursive = va_arg(args, gboolean);
   581     do_locations_list_xml(out, rsc, 
false);
   584     out->message(out, 
"rscs-colocated-with-list", rsc, recursive);
   587     out->message(out, 
"rsc-is-colocated-with-list", rsc, recursive);
   593 PCMK__OUTPUT_ARGS(
"health", 
"const char *", 
"const char *", 
"const char *", 
"const char *")
   597     const char *sys_from G_GNUC_UNUSED = va_arg(args, 
const char *);
   598     const char *host_from = va_arg(args, 
const char *);
   599     const char *fsa_state = va_arg(args, 
const char *);
   600     const char *
result = va_arg(args, 
const char *);
   602     if (!out->is_quiet(out)) {
   603         return out->info(out, 
"Controller on %s in state %s: %s", 
crm_str(host_from),
   605     } 
else if (fsa_state != NULL) {
   613 PCMK__OUTPUT_ARGS(
"health", 
"const char *", 
"const char *", 
"const char *", 
"const char *")
   617     const char *sys_from = va_arg(args, 
const char *);
   618     const char *host_from = va_arg(args, 
const char *);
   619     const char *fsa_state = va_arg(args, 
const char *);
   620     const char *
result = va_arg(args, 
const char *);
   623                                  "node_name", 
crm_str(host_from),
   630 PCMK__OUTPUT_ARGS(
"pacemakerd-health", 
"const char *", 
"const char *", 
"const char *")
   634     const char *sys_from = va_arg(args, 
const char *);
   635     const char *state = va_arg(args, 
const char *);
   636     const char *last_updated = va_arg(args, 
const char *);
   638     if (!out->is_quiet(out)) {
   639         return out->info(out, 
"Status of %s: '%s' %s %s", 
crm_str(sys_from),
   640                          crm_str(state), (!pcmk__str_empty(last_updated))?
   641                          "last updated":
"", 
crm_str(last_updated));
   650 PCMK__OUTPUT_ARGS(
"pacemakerd-health", 
"const char *", 
"const char *", 
"const char *")
   654     const char *sys_from = va_arg(args, 
const char *);
   655     const char *state = va_arg(args, 
const char *);
   656     const char *last_updated = va_arg(args, 
const char *);
   660                                  "last_updated", 
crm_str(last_updated),
   668     const char *xml_file = va_arg(args, 
const char *);
   669     clock_t start = va_arg(args, clock_t);
   670     clock_t end = va_arg(args, clock_t);
   672     out->list_item(out, NULL, 
"Testing %s ... %.2f secs", xml_file,
   673                    (end - start) / (
float) CLOCKS_PER_SEC);
   681     const char *xml_file = va_arg(args, 
const char *);
   682     clock_t start = va_arg(args, clock_t);
   683     clock_t end = va_arg(args, clock_t);
   685     char *duration = pcmk__ftoa((end - start) / (
float) CLOCKS_PER_SEC);
   689                                  "duration", duration,
   700     const char *dc = va_arg(args, 
const char *);
   702     if (!out->is_quiet(out)) {
   703         return out->info(out, 
"Designated Controller is: %s", 
crm_str(dc));
   704     } 
else if (dc != NULL) {
   716     const char *dc = va_arg(args, 
const char *);
   724 PCMK__OUTPUT_ARGS(
"crmadmin-node", 
"const char *", 
"const char *", 
"const char *", 
"gboolean")
   728     const char *
type = va_arg(args, 
const char *);
   729     const char *
name = va_arg(args, 
const char *);
   730     const char *
id = va_arg(args, 
const char *);
   731     gboolean BASH_EXPORT = va_arg(args, gboolean);
   733     if (out->is_quiet(out)) {
   736     } 
else if (BASH_EXPORT) {
   739         return out->info(out, 
"%s node: %s (%s)", 
type ? 
type : 
"cluster",
   744 PCMK__OUTPUT_ARGS(
"crmadmin-node", 
"const char *", 
"const char *", 
"const char *", 
"gboolean")
   748     const char *
type = va_arg(args, 
const char *);
   749     const char *
name = va_arg(args, 
const char *);
   750     const char *
id = va_arg(args, 
const char *);
   761                   "guint", 
"op_digest_cache_t *")
   767     const char *task = va_arg(args, 
const char *);
   768     guint interval_ms = va_arg(args, guint);
   771     char *action_desc = NULL;
   772     const char *rsc_desc = 
"unknown resource";
   773     const char *node_desc = 
"unknown node";
   775     if (interval_ms != 0) {
   777                                         ((task == NULL)? 
"unknown" : task));
   779         action_desc = strdup(
"probe action");
   782                                         ((task == NULL)? 
"unknown" : task));
   784     if ((rsc != NULL) && (rsc->
id != NULL)) {
   790     out->begin_list(out, NULL, NULL, 
"Digests for %s %s on %s",
   791                     rsc_desc, action_desc, node_desc);
   794     if (digests == NULL) {
   795         out->list_item(out, NULL, 
"none");
   800         out->list_item(out, NULL, 
"%s (all parameters)",
   804         out->list_item(out, NULL, 
"%s (non-private parameters)",
   808         out->list_item(out, NULL, 
"%s (non-reloadable parameters)",
   816 add_digest_xml(xmlNode *
parent, 
const char *
type, 
const char *digest,
   817                xmlNode *digest_source)
   819     if (digest != NULL) {
   824         if (digest_source != NULL) {
   831                   "guint", 
"op_digest_cache_t *")
   837     const char *task = va_arg(args, 
const char *);
   838     guint interval_ms = va_arg(args, guint);
   848                                        "interval", interval_s,
   851     if (digests != NULL) {
   862 #define STOP_SANITY_ASSERT(lineno) do {                                 \   863         if(current && current->details->unclean) {                      \   865         } else if(stop == NULL) {                                       \   866             crm_err("%s:%d: No stop action exists for %s",              \   867                     __func__, lineno, rsc->id);                         \   868             CRM_ASSERT(stop != NULL);                                   \   869         } else if (pcmk_is_set(stop->flags, pe_action_optional)) {      \   870             crm_err("%s:%d: Action %s is still optional",               \   871                     __func__, lineno, stop->uuid);                      \   872             CRM_ASSERT(!pcmk_is_set(stop->flags, pe_action_optional));  \   884     GList *possible_matches = NULL;
   896         || (current == NULL && next == NULL)) {
   903     moving = (current != NULL) && (next != NULL)
   907     if (possible_matches) {
   908         start = possible_matches->data;
   909         g_list_free(possible_matches);
   915         start_node = current;
   918     if (possible_matches) {
   919         stop = possible_matches->data;
   920         g_list_free(possible_matches);
   927         if (possible_matches != NULL) {
   928             stop = possible_matches->data;
   929             g_list_free(possible_matches);
   934     if (possible_matches) {
   935         promote = possible_matches->data;
   936         g_list_free(possible_matches);
   940     if (possible_matches) {
   941         demote = possible_matches->data;
   942         g_list_free(possible_matches);
   951         if (possible_matches) {
   952             migrate_op = possible_matches->data;
   955         if ((migrate_op != NULL) && (current != NULL)
   957             rc = out->message(out, 
"rsc-action-item", 
"Migrate", rsc, current,
   961             rc = out->message(out, 
"rsc-action-item", 
"Reload", rsc, current,
   965             if ((demote != NULL) && (promote != NULL)
   968                 rc = out->message(out, 
"rsc-action-item", 
"Re-promote", rsc,
   969                                   current, next, promote, demote);
   976             rc = out->message(out, 
"rsc-action-item", 
"Stop", rsc, current,
   977                               NULL, stop, (stop && stop->
reason)? stop : start);
   980         } 
else if (moving && current) {
   982                               rsc, current, next, stop, NULL);
   985             rc = out->message(out, 
"rsc-action-item", 
"Recover", rsc, current,
   990             rc = out->message(out, 
"rsc-action-item", 
"Restart", rsc, current,
   995         g_list_free(possible_matches);
  1003         GList *gIter = NULL;
  1006         for (gIter = rsc->
running_on; gIter != NULL; gIter = gIter->next) {
  1011             if (possible_matches) {
  1012                 stop_op = possible_matches->data;
  1013                 g_list_free(possible_matches);
  1020             if (out->message(out, 
"rsc-action-item", 
"Stop", rsc, node, NULL,
  1021                              stop_op, (stop_op && stop_op->reason)? stop_op : start) == 
pcmk_rc_ok) {
  1028     } 
else if ((stop != NULL)
  1031         rc = out->message(out, 
"rsc-action-item", 
"Recover", rsc, current,
  1035     } 
else if (moving) {
  1036         rc = out->message(out, 
"rsc-action-item", 
"Move", rsc, current, next,
  1041         rc = out->message(out, 
"rsc-action-item", 
"Reload", rsc, current, next,
  1045         rc = out->message(out, 
"rsc-action-item", 
"Restart", rsc, current,
  1051         rc = out->message(out, 
"rsc-action-item", 
"Demote", rsc, current,
  1052                           next, demote, NULL);
  1056         rc = out->message(out, 
"rsc-action-item", 
"Promote", rsc, current,
  1057                           next, promote, NULL);
  1060         rc = out->message(out, 
"rsc-action-item", 
"Start", rsc, current, next,
  1071     char *task = va_arg(args, 
char *);
  1072     char *node_name = va_arg(args, 
char *);
  1073     char *reason = va_arg(args, 
char *);
  1077     } 
else if (reason) {
  1078         out->list_item(out, NULL, 
"%s %s '%s'", task, node_name, reason);
  1090     char *task = va_arg(args, 
char *);
  1091     char *node_name = va_arg(args, 
char *);
  1092     char *reason = va_arg(args, 
char *);
  1096     } 
else if (reason) {
  1109 PCMK__OUTPUT_ARGS(
"inject-cluster-action", 
"const char *", 
"const char *", 
"xmlNodePtr")
  1113     const char *node = va_arg(args, 
const char *);
  1114     const char *task = va_arg(args, 
const char *);
  1115     xmlNodePtr rsc = va_arg(args, xmlNodePtr);
  1117     if (out->is_quiet(out)) {
  1122         out->list_item(out, NULL, 
"Cluster action:  %s for %s on %s", task, 
ID(rsc), node);
  1124         out->list_item(out, NULL, 
"Cluster action:  %s on %s", task, node);
  1130 PCMK__OUTPUT_ARGS(
"inject-cluster-action", 
"const char *", 
"const char *", 
"xmlNodePtr")
  1134     const char *node = va_arg(args, 
const char *);
  1135     const char *task = va_arg(args, 
const char *);
  1136     xmlNodePtr rsc = va_arg(args, xmlNodePtr);
  1138     xmlNodePtr xml_node = NULL;
  1140     if (out->is_quiet(out)) {
  1160     char *
target = va_arg(args, 
char *);
  1161     const char *op = va_arg(args, 
const char *);
  1163     if (out->is_quiet(out)) {
  1167     out->list_item(out, NULL, 
"Fencing %s (%s)", 
target, op);
  1175     char *
target = va_arg(args, 
char *);
  1176     const char *op = va_arg(args, 
const char *);
  1178     if (out->is_quiet(out)) {
  1193     const char *
name = va_arg(args, 
const char *);
  1194     const char *value = va_arg(args, 
const char *);
  1195     xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
  1197     xmlChar *node_path = NULL;
  1199     if (out->is_quiet(out)) {
  1203     node_path = xmlGetNodePath(cib_node);
  1205     out->list_item(out, NULL, 
"Injecting attribute %s=%s into %s '%s'",
  1206                    name, value, node_path, 
ID(cib_node));
  1216     const char *
name = va_arg(args, 
const char *);
  1217     const char *value = va_arg(args, 
const char *);
  1218     xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
  1220     xmlChar *node_path = NULL;
  1222     if (out->is_quiet(out)) {
  1226     node_path = xmlGetNodePath(cib_node);
  1231                                  "node_path", node_path,
  1232                                  "cib_node", 
ID(cib_node),
  1242     const char *spec = va_arg(args, 
const char *);
  1244     if (out->is_quiet(out)) {
  1248     out->list_item(out, NULL, 
"Injecting %s into the configuration", spec);
  1256     const char *spec = va_arg(args, 
const char *);
  1258     if (out->is_quiet(out)) {
  1272     char *quorum = va_arg(args, 
char *);
  1273     char *watchdog = va_arg(args, 
char *);
  1275     if (out->is_quiet(out)) {
  1279     out->begin_list(out, NULL, NULL, 
"Performing Requested Modifications");
  1282         out->list_item(out, NULL, 
"Setting quorum: %s", quorum);
  1286         out->list_item(out, NULL, 
"Setting watchdog: %s", watchdog);
  1296     char *quorum = va_arg(args, 
char *);
  1297     char *watchdog = va_arg(args, 
char *);
  1299     xmlNodePtr node = NULL;
  1301     if (out->is_quiet(out)) {
  1322     const char *
action = va_arg(args, 
const char *);
  1323     char *node = va_arg(args, 
char *);
  1325     if (out->is_quiet(out)) {
  1330         out->list_item(out, NULL, 
"Bringing node %s online", node);
  1333         out->list_item(out, NULL, 
"Taking node %s offline", node);
  1336         out->list_item(out, NULL, 
"Failing node %s", node);
  1347     const char *
action = va_arg(args, 
const char *);
  1348     char *node = va_arg(args, 
char *);
  1350     if (out->is_quiet(out)) {
  1365     const char *
action = va_arg(args, 
const char *);
  1366     char *ticket = va_arg(args, 
char *);
  1368     if (out->is_quiet(out)) {
  1373         out->list_item(out, NULL, 
"Making ticket %s standby", ticket);
  1375         out->list_item(out, NULL, 
"%s ticket %s", 
action, ticket);
  1385     const char *
action = va_arg(args, 
const char *);
  1386     char *ticket = va_arg(args, 
char *);
  1388     if (out->is_quiet(out)) {
  1403     const char *node = va_arg(args, 
const char *);
  1404     const char *task = va_arg(args, 
const char *);
  1406     if (out->is_quiet(out)) {
  1410     out->list_item(out, NULL, 
"Pseudo action:   %s%s%s", task, node ? 
" on " : 
"",
  1419     const char *node = va_arg(args, 
const char *);
  1420     const char *task = va_arg(args, 
const char *);
  1422     xmlNodePtr xml_node = NULL;
  1424     if (out->is_quiet(out)) {
  1438 PCMK__OUTPUT_ARGS(
"inject-rsc-action", 
"const char *", 
"const char *", 
"char *", 
"guint")
  1442     const char *rsc = va_arg(args, 
const char *);
  1443     const char *operation = va_arg(args, 
const char *);
  1444     char *node = va_arg(args, 
char *);
  1445     guint interval_ms = va_arg(args, guint);
  1447     if (out->is_quiet(out)) {
  1452         out->list_item(out, NULL, 
"Resource action: %-15s %s=%u on %s",
  1453                        rsc, operation, interval_ms, node);
  1455         out->list_item(out, NULL, 
"Resource action: %-15s %s on %s",
  1456                        rsc, operation, node);
  1462 PCMK__OUTPUT_ARGS(
"inject-rsc-action", 
"const char *", 
"const char *", 
"char *", 
"guint")
  1466     const char *rsc = va_arg(args, 
const char *);
  1467     const char *operation = va_arg(args, 
const char *);
  1468     char *node = va_arg(args, 
char *);
  1469     guint interval_ms = va_arg(args, guint);
  1471     xmlNodePtr xml_node = NULL;
  1473     if (out->is_quiet(out)) {
  1484         char *interval_s = pcmk__itoa(interval_ms);
  1493 #define CHECK_RC(retcode, retval)   \  1494     if (retval == pcmk_rc_ok) {     \  1495         retcode = pcmk_rc_ok;       \  1499                   "gboolean", 
"uint32_t", 
"uint32_t", 
"const char *", 
"GList *", 
"GList *")
  1506     gboolean fence_history = va_arg(args, gboolean);
  1507     uint32_t section_opts = va_arg(args, uint32_t);
  1508     uint32_t show_opts = va_arg(args, uint32_t);
  1509     const char *prefix = va_arg(args, 
const char *);
  1510     GList *unames = va_arg(args, GList *);
  1511     GList *resources = va_arg(args, GList *);
  1514     bool already_printed_failure = 
false;
  1517                               section_opts, show_opts));
  1533                                   show_opts, rc == 
pcmk_rc_ok, unames, resources));
  1541                                   resources, section_opts, show_opts, rc == 
pcmk_rc_ok));
  1554         if (history_rc == 0) {
  1559                 CHECK_RC(rc, out->message(out, 
"failed-fencing-list", stonith_history, unames,
  1564             out->begin_list(out, NULL, NULL, 
"Failed Fencing Actions");
  1565             out->list_item(out, NULL, 
"Failed to get fencing history: %s",
  1569             already_printed_failure = 
true;
  1586         if (history_rc != 0) {
  1587             if (!already_printed_failure) {
  1589                 out->begin_list(out, NULL, NULL, 
"Failed Fencing Actions");
  1590                 out->list_item(out, NULL, 
"Failed to get fencing history: %s",
  1599                 CHECK_RC(rc, out->message(out, 
"fencing-list", hp, unames,
  1606                 CHECK_RC(rc, out->message(out, 
"pending-fencing-list", hp, unames,
  1615 PCMK__OUTPUT_ARGS(
"cluster-status", 
"pe_working_set_t *", 
"crm_exit_t", 
"stonith_history_t *",
  1616                   "gboolean", 
"uint32_t", 
"uint32_t", 
"const char *", 
"GList *", 
"GList *")
  1623     gboolean fence_history = va_arg(args, gboolean);
  1624     uint32_t section_opts = va_arg(args, uint32_t);
  1625     uint32_t show_opts = va_arg(args, uint32_t);
  1626     const char *prefix = va_arg(args, 
const char *);
  1627     GList *unames = va_arg(args, GList *);
  1628     GList *resources = va_arg(args, GList *);
  1630     out->message(out, 
"cluster-summary", 
data_set, section_opts, show_opts);
  1634         out->message(out, 
"node-list", 
data_set->
nodes, unames, resources,
  1643         out->message(out, 
"resource-list", 
data_set, full_show_opts,
  1644                      FALSE, unames, resources, FALSE);
  1649         out->message(out, 
"node-attribute-list", 
data_set, show_opts, FALSE,
  1657         out->message(out, 
"node-summary", 
data_set, unames,
  1658                      resources, section_opts, show_opts, FALSE);
  1665         out->message(out, 
"failed-action-list", 
data_set, unames, resources,
  1671         out->message(out, 
"full-fencing-list", history_rc, stonith_history,
  1672                      unames, section_opts, FALSE);
  1677         out->message(out, 
"ticket-list", 
data_set, FALSE);
  1682         out->message(out, 
"ban-list", 
data_set, prefix, resources, show_opts,
  1689 PCMK__OUTPUT_ARGS(
"cluster-status", 
"pe_working_set_t *", 
"crm_exit_t", 
"stonith_history_t *",
  1690                   "gboolean", 
"uint32_t", 
"uint32_t", 
"const char *", 
"GList *",
  1698     gboolean fence_history = va_arg(args, gboolean);
  1699     uint32_t section_opts = va_arg(args, uint32_t);
  1700     uint32_t show_opts = va_arg(args, uint32_t);
  1701     const char *prefix = va_arg(args, 
const char *);
  1702     GList *unames = va_arg(args, GList *);
  1703     GList *resources = va_arg(args, GList *);
  1704     bool already_printed_failure = 
false;
  1706     out->message(out, 
"cluster-summary", 
data_set, section_opts, show_opts);
  1710         out->message(out, 
"node-list", 
data_set->
nodes, unames, resources,
  1716         out->message(out, 
"resource-list", 
data_set, show_opts, TRUE, unames,
  1722         out->message(out, 
"node-attribute-list", 
data_set, show_opts, FALSE,
  1730         out->message(out, 
"node-summary", 
data_set, unames,
  1731                      resources, section_opts, show_opts, FALSE);
  1738         out->message(out, 
"failed-action-list", 
data_set, unames, resources,
  1744         if (history_rc == 0) {
  1749                 out->message(out, 
"failed-fencing-list", stonith_history, unames,
  1750                              section_opts, FALSE);
  1753             out->begin_list(out, NULL, NULL, 
"Failed Fencing Actions");
  1754             out->list_item(out, NULL, 
"Failed to get fencing history: %s",
  1762         if (history_rc != 0) {
  1763             if (!already_printed_failure) {
  1764                 out->begin_list(out, NULL, NULL, 
"Failed Fencing Actions");
  1765                 out->list_item(out, NULL, 
"Failed to get fencing history: %s",
  1774                 out->message(out, 
"fencing-list", hp, unames, section_opts, FALSE);
  1780                 out->message(out, 
"pending-fencing-list", hp, unames,
  1781                              section_opts, FALSE);
  1788         out->message(out, 
"ticket-list", 
data_set, FALSE);
  1793         out->message(out, 
"ban-list", 
data_set, prefix, resources, show_opts,
  1804     char *scope = va_arg(args, 
char *);
  1805     char *instance = va_arg(args, 
char *);
  1806     char *
name = va_arg(args, 
char *);
  1807     char *value = va_arg(args, 
char *);
  1808     char *
host = va_arg(args, 
char *);
  1810     GString *s = g_string_sized_new(50);
  1812     if (!pcmk__str_empty(scope)) {
  1813         g_string_append_printf(s, 
"scope=\"%s\" ", scope);
  1816     if (!pcmk__str_empty(instance)) {
  1817         g_string_append_printf(s, 
"id=\"%s\" ", instance);
  1820     g_string_append_printf(s, 
"name=\"%s\" ", 
name);
  1822     if (!pcmk__str_empty(
host)) {
  1823         g_string_append_printf(s, 
"host=\"%s\" ", 
host);
  1826     g_string_append_printf(s, 
"value=\"%s\"", value ? value : 
"");
  1828     out->info(out, 
"%s", s->str);
  1829     g_string_free(s, TRUE);
  1838     char *scope = va_arg(args, 
char *);
  1839     char *instance = va_arg(args, 
char *);
  1840     char *
name = va_arg(args, 
char *);
  1841     char *value = va_arg(args, 
char *);
  1842     char *
host = va_arg(args, 
char *);
  1844     xmlNodePtr node = NULL;
  1848                                         "value", value ? value : 
"",
  1851     if (!pcmk__str_empty(scope)) {
  1855     if (!pcmk__str_empty(instance)) {
  1859     if (!pcmk__str_empty(
host)) {
  1867     { 
"attribute", 
"default", attribute_default },
  1868     { 
"attribute", 
"xml", attribute_xml },
  1870     { 
"cluster-status", 
"html", cluster_status_html },
  1871     { 
"cluster-status", 
"xml", cluster_status_xml },
  1872     { 
"crmadmin-node", 
"default", crmadmin_node_text },
  1873     { 
"crmadmin-node", 
"xml", crmadmin_node_xml },
  1874     { 
"dc", 
"default", dc_text },
  1875     { 
"dc", 
"xml", dc_xml },
  1876     { 
"digests", 
"default", digests_text },
  1877     { 
"digests", 
"xml", digests_xml },
  1878     { 
"health", 
"default", health_text },
  1879     { 
"health", 
"xml", health_xml },
  1880     { 
"inject-attr", 
"default", inject_attr },
  1881     { 
"inject-attr", 
"xml", inject_attr_xml },
  1882     { 
"inject-cluster-action", 
"default", inject_cluster_action },
  1883     { 
"inject-cluster-action", 
"xml", inject_cluster_action_xml },
  1884     { 
"inject-fencing-action", 
"default", inject_fencing_action },
  1885     { 
"inject-fencing-action", 
"xml", inject_fencing_action_xml },
  1886     { 
"inject-modify-config", 
"default", inject_modify_config },
  1887     { 
"inject-modify-config", 
"xml", inject_modify_config_xml },
  1888     { 
"inject-modify-node", 
"default", inject_modify_node },
  1889     { 
"inject-modify-node", 
"xml", inject_modify_node_xml },
  1890     { 
"inject-modify-ticket", 
"default", inject_modify_ticket },
  1891     { 
"inject-modify-ticket", 
"xml", inject_modify_ticket_xml },
  1892     { 
"inject-pseudo-action", 
"default", inject_pseudo_action },
  1893     { 
"inject-pseudo-action", 
"xml", inject_pseudo_action_xml },
  1894     { 
"inject-rsc-action", 
"default", inject_rsc_action },
  1895     { 
"inject-rsc-action", 
"xml", inject_rsc_action_xml },
  1896     { 
"inject-spec", 
"default", inject_spec },
  1897     { 
"inject-spec", 
"xml", inject_spec_xml },
  1898     { 
"locations-list", 
"default", locations_list },
  1899     { 
"locations-list", 
"xml", locations_list_xml },
  1900     { 
"node-action", 
"default", node_action },
  1901     { 
"node-action", 
"xml", node_action_xml },
  1902     { 
"pacemakerd-health", 
"default", pacemakerd_health_text },
  1903     { 
"pacemakerd-health", 
"xml", pacemakerd_health_xml },
  1904     { 
"profile", 
"default", profile_default, },
  1905     { 
"profile", 
"xml", profile_xml },
  1906     { 
"rsc-action", 
"default", rsc_action_default },
  1907     { 
"rsc-action-item", 
"default", rsc_action_item },
  1908     { 
"rsc-action-item", 
"xml", rsc_action_item_xml },
  1909     { 
"rsc-is-colocated-with-list", 
"default", rsc_is_colocated_with_list },
  1910     { 
"rsc-is-colocated-with-list", 
"xml", rsc_is_colocated_with_list_xml },
  1911     { 
"rscs-colocated-with-list", 
"default", rscs_colocated_with_list },
  1912     { 
"rscs-colocated-with-list", 
"xml", rscs_colocated_with_list_xml },
  1913     { 
"stacks-constraints", 
"default", stacks_and_constraints },
  1914     { 
"stacks-constraints", 
"xml", stacks_and_constraints_xml },
  1916     { NULL, NULL, NULL }
 
#define CRM_CHECK(expr, failure_action)
 
#define crm_notice(fmt, args...)
 
stonith_history_t * stonith__first_matching_event(stonith_history_t *history, bool(*matching_fn)(stonith_history_t *, void *), void *user_data)
 
Control output from tools. 
 
GList * find_actions(GList *input, const char *key, const pe_node_t *on_node)
 
enum rsc_role_e next_role
 
xmlNodePtr pcmk__output_xml_create_parent(pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED
 
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value. 
 
#define CHECK_RC(retcode, retval)
 
pe_resource_t * dependent
 
void pcmk__xe_set_bool_attr(xmlNodePtr node, const char *name, bool value)
 
#define XML_CONS_TAG_RSC_DEPEND
 
enum crm_exit_e crm_exit_t
 
#define CRM_LOG_ASSERT(expr)
 
enum crm_ais_msg_types type
 
#define pe_rsc_stop_unexpected
 
void pcmk__register_lib_messages(pcmk__output_t *out)
 
bool stonith__event_state_pending(stonith_history_t *history, void *user_data)
 
#define pe__set_resource_flags(resource, flags_to_set)
 
void void void pcmk__formatted_printf(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
 
#define PCMK__OUTPUT_SPACER_IF(out_obj, cond)
 
const char * role2text(enum rsc_role_e role)
 
const char * crm_exit_str(crm_exit_t exit_code)
 
pe_resource_t * uber_parent(pe_resource_t *rsc)
 
#define XML_CONS_TAG_RSC_LOCATION
 
char * digest_secure_calc
 
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
 
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag. 
 
xmlNode * add_node_copy(xmlNode *new_parent, xmlNode *xml_node)
 
struct pe_node_shared_s * details
 
pe_working_set_t * data_set
 
void pcmk__unpack_constraints(pe_working_set_t *data_set)
 
xmlNode * create_xml_node(xmlNode *parent, const char *name)
 
xmlNodePtr pcmk__output_create_xml_node(pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED
 
#define pcmk_section_fencing_all
 
int pcmk__cluster_status_text(pcmk__output_t *out, va_list args)
 
#define pe_rsc_allocating
 
gboolean xml_has_children(const xmlNode *root)
 
void pcmk__output_xml_pop_parent(pcmk__output_t *out)
 
Function and executable result codes. 
 
void pcmk__xe_set_props(xmlNodePtr node,...) G_GNUC_NULL_TERMINATED
 
const xmlChar * pcmkXmlStr
 
#define PCMK__OUTPUT_LIST_FOOTER(out_obj, retcode)
 
#define PCMK__OUTPUT_LIST_HEADER(out_obj, cond, retcode, title...)
 
pcmk__action_result_t result
 
#define STOP_SANITY_ASSERT(lineno)
 
This structure contains everything that makes up a single output formatter. 
 
void pe__clear_resource_flags_on_all(pe_working_set_t *data_set, uint64_t flag)
 
void pcmk__register_messages(pcmk__output_t *out, pcmk__message_entry_t *table)
 
enum pe_action_flags flags
 
const char * node_attribute
 
GList * pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource. 
 
bool stonith__event_state_eq(stonith_history_t *history, void *user_data)
 
PCMK__OUTPUT_ARGS("rsc-action-item", "const char *", "pe_resource_t *", "pe_node_t *", "pe_node_t *", "pe_action_t *", "pe_action_t *")
 
char * digest_restart_calc
 
bool stonith__event_state_neq(stonith_history_t *history, void *user_data)
 
#define pe_rsc_info(rsc, fmt, args...)
 
char * score2char(int score)
Return the string equivalent of an integer score.