21     const char * desc = NULL;
    31 #define FILTER_STR { PCMK__FAIL_COUNT_PREFIX, PCMK__LAST_FAILURE_PREFIX,   \    32                      "shutdown", "terminate", "standby", "#", NULL }    35 compare_attribute(gconstpointer a, gconstpointer b)
    39     rc = strcmp((
const char *)a, (
const char *)b);
    61                const char *attrname, 
int *expected_score)
    65     for (gIter = rsc_list; gIter != NULL; gIter = gIter->next) {
    67         const char *
type = g_hash_table_lookup(rsc->
meta, 
"type");
    68         const char *
name = NULL;
    69         GHashTable *params = NULL;
    83         name = g_hash_table_lookup(params, 
"name");
    91             int host_list_num = 0;
    92             const char *hosts = g_hash_table_lookup(params, 
"host_list");
    93             const char *multiplier = g_hash_table_lookup(params, 
"multiplier");
    97                 char **host_list = g_strsplit(hosts, 
" ", 0);
    98                 host_list_num = g_strv_length(host_list);
    99                 g_strfreev(host_list);
   102             if ((multiplier == NULL)
   111             *expected_score = host_list_num * multiplier_i;
   120 filter_attr_list(GList *attr_list, 
char *
name)
   128     for (i = 0; filt_str[i] != NULL; i++) {
   129         if (g_str_has_prefix(
name, filt_str[i])) {
   134     return g_list_insert_sorted(attr_list, 
name, compare_attribute);
   138 get_operation_list(xmlNode *rsc_entry) {
   139     GList *op_list = NULL;
   140     xmlNode *rsc_op = NULL;
   142     for (rsc_op = pcmk__xe_first_child(rsc_entry); rsc_op != NULL;
   143          rsc_op = pcmk__xe_next(rsc_op)) {
   164             op_list = g_list_append(op_list, rsc_op);
   173 add_dump_node(gpointer key, gpointer value, gpointer user_data)
   175     xmlNodePtr node = user_data;
   180 append_dump_text(gpointer key, gpointer value, gpointer user_data)
   182     char **dump_text = user_data;
   184                                        *dump_text, (
char *)key, (
char *)value);
   187     *dump_text = new_text;
   193     xmlNode *stack = 
get_xpath_object(
"//nvpair[@name='cluster-infrastructure']",
   199 last_changed_string(
const char *last_written, 
const char *user,
   200                     const char *client, 
const char *origin) {
   201     if (last_written != NULL || user != NULL || client != NULL || origin != NULL) {
   203                                  last_written ? last_written : 
"",
   206                                  client ? 
" via " : 
"",
   207                                  client ? client : 
"",
   208                                  origin ? 
" on " : 
"",
   209                                  origin ? origin : 
"");
   216 op_history_string(xmlNode *xml_op, 
const char *task, 
const char *interval_ms_s,
   217                   int rc, 
bool print_timing) {
   219     char *interval_str = NULL;
   222     if (interval_ms_s && !pcmk__str_eq(interval_ms_s, 
"0", 
pcmk__str_casei)) {
   229         char *last_change_str = NULL;
   230         char *exec_str = NULL;
   231         char *queue_str = NULL;
   233         const char *value = NULL;
   243                                                 pcmk__s(epoch_str, 
""));
   262                                 interval_str ? interval_str : 
"",
   263                                 last_change_str ? last_change_str : 
"",
   264                                 exec_str ? exec_str : 
"",
   265                                 queue_str ? queue_str : 
"",
   266                                 rc, services_ocf_exitcode_str(rc));
   268         if (last_change_str) {
   269             free(last_change_str);
   281                                 interval_str ? 
":" : 
"",
   282                                 interval_str ? interval_str : 
"");
   293 resource_history_string(
pe_resource_t *rsc, 
const char *rsc_id, 
bool all,
   294                         int failcount, time_t last_failure) {
   299     } 
else if (all || failcount || last_failure > 0) {
   300         char *failcount_s = NULL;
   301         char *lastfail_s = NULL;
   307             failcount_s = strdup(
"");
   309         if (last_failure > 0) {
   318                                 lastfail_s? lastfail_s : 
"");
   330     const char *feature_set = NULL;
   337         if (feature_set == NULL) {
   338             feature_set = 
"<3.15.1";
   346     const char *feature_set = NULL;
   347     for (GList *gIter = 
data_set->
nodes; gIter != NULL; gIter = gIter->next) {
   349         const char *node_feature_set = get_node_feature_set(node);
   350         if (node_feature_set != NULL) {
   351             if (feature_set == NULL) {
   352                 feature_set = node_feature_set;
   353             } 
else if (strcmp(feature_set, node_feature_set) != 0) {
   372                   "enum pcmk_pacemakerd_state", 
"uint32_t", 
"uint32_t")
   378     uint32_t section_opts = va_arg(args, uint32_t);
   379     uint32_t show_opts = va_arg(args, uint32_t);
   382     const char *stack_s = get_cluster_stack(
data_set);
   386         out->message(out, 
"cluster-stack", stack_s, pcmkd_state);
   392         const char *dc_version_s = dc_version?
   397         bool mixed_version = is_mixed_version(
data_set);
   401                      dc_version_s, dc_name, mixed_version);
   412         out->message(out, 
"cluster-times",
   418         out->message(out, 
"cluster-counts", g_list_length(
data_set->
nodes),
   425         out->message(out, 
"cluster-options", 
data_set);
   440                   "enum pcmk_pacemakerd_state", 
"uint32_t", 
"uint32_t")
   446     uint32_t section_opts = va_arg(args, uint32_t);
   447     uint32_t show_opts = va_arg(args, uint32_t);
   450     const char *stack_s = get_cluster_stack(
data_set);
   454         out->message(out, 
"cluster-stack", stack_s, pcmkd_state);
   461         const char *dc_version_s = dc_version?
   466         bool mixed_version = is_mixed_version(
data_set);
   470                      dc_version_s, dc_name, mixed_version);
   481         out->message(out, 
"cluster-times",
   487         out->message(out, 
"cluster-counts", g_list_length(
data_set->
nodes),
   499         out->begin_list(out, NULL, NULL, 
"Config Options");
   500         out->message(out, 
"cluster-options", 
data_set);
   518     const char *node_host = NULL;
   519     const char *node_id = NULL;
   527         const pe_node_t *host_node = pe__current_node(container);
   529         if (host_node && host_node->
details) {
   532         if (node_host == NULL) {
   545         name_len += strlen(node_host) + 1; 
   548         name_len += strlen(node_id) + 3; 
   552     node_name = malloc(name_len);
   556         strcat(node_name, 
"@");
   557         strcat(node_name, node_host);
   560         strcat(node_name, 
" (");
   561         strcat(node_name, node_id);
   562         strcat(node_name, 
")");
   569                          , 
size_t pairs_count, ...)
   571     xmlNodePtr xml_node = NULL;
   580         : xmlNewChild(xml_node, NULL, (
pcmkXmlStr) tag_name, NULL);
   582     va_start(args, pairs_count);
   583     while(pairs_count--) {
   584         const char *param_name = va_arg(args, 
const char *);
   585         const char *param_value = va_arg(args, 
const char *);
   586         if (param_name && param_value) {
   602 #ifdef PCMK__COMPAT_2_0   616     uint32_t show_opts = va_arg(args, uint32_t);
   636     uint32_t show_opts = va_arg(args, uint32_t);
   640     out->list_item(out, NULL, 
"%s\tprevents %s from running %son %s",
   653     uint32_t show_opts G_GNUC_UNUSED = va_arg(args, uint32_t);
   656     char *weight_s = pcmk__itoa(pe_node->
weight);
   663                                  "promoted-only", promoted_only,
   670                                  "master_only", promoted_only,
   682     const char *prefix = va_arg(args, 
const char *);
   683     GList *only_rsc = va_arg(args, GList *);
   684     uint32_t show_opts = va_arg(args, uint32_t);
   685     bool print_spacer = va_arg(args, 
int);
   687     GList *gIter, *gIter2;
   695         if (prefix != NULL && !g_str_has_prefix(location->
id, prefix)) {
   706         for (gIter2 = location->
node_list_rh; gIter2 != NULL; gIter2 = gIter2->next) {
   711                 out->message(out, 
"ban", node, location, show_opts);
   723     unsigned int nnodes = va_arg(args, 
unsigned int);
   724     int nresources = va_arg(args, 
int);
   725     int ndisabled = va_arg(args, 
int);
   726     int nblocked = va_arg(args, 
int);
   737     if (ndisabled && nblocked) {
   752                               " from further action due to failure)");
   753     } 
else if (ndisabled && !nblocked) {
   762     } 
else if (!ndisabled && nblocked) {
   771                               " from further action due to failure)");
   785     unsigned int nnodes = va_arg(args, 
unsigned int);
   786     int nresources = va_arg(args, 
int);
   787     int ndisabled = va_arg(args, 
int);
   788     int nblocked = va_arg(args, 
int);
   790     out->list_item(out, NULL, 
"%d node%s configured",
   793     if (ndisabled && nblocked) {
   794         out->list_item(out, NULL, 
"%d resource instance%s configured "   795                                   "(%d DISABLED, %d BLOCKED from "   796                                   "further action due to failure)",
   799     } 
else if (ndisabled && !nblocked) {
   800         out->list_item(out, NULL, 
"%d resource instance%s configured "   803     } 
else if (!ndisabled && nblocked) {
   804         out->list_item(out, NULL, 
"%d resource instance%s configured "   805                                   "(%d BLOCKED from further action "   809         out->list_item(out, NULL, 
"%d resource instance%s configured",
   819     unsigned int nnodes = va_arg(args, 
unsigned int);
   820     int nresources = va_arg(args, 
int);
   821     int ndisabled = va_arg(args, 
int);
   822     int nblocked = va_arg(args, 
int);
   827     char *s = pcmk__itoa(nnodes);
   831     s = pcmk__itoa(nresources);
   835     s = pcmk__itoa(ndisabled);
   839     s = pcmk__itoa(nblocked);
   851     const char *quorum = va_arg(args, 
const char *);
   852     const char *dc_version_s = va_arg(args, 
const char *);
   853     char *dc_name = va_arg(args, 
char *);
   854     bool mixed_version = va_arg(args, 
int);
   862                                       dc_version_s ? dc_version_s : 
"unknown");
   889     const char *quorum = va_arg(args, 
const char *);
   890     const char *dc_version_s = va_arg(args, 
const char *);
   891     char *dc_name = va_arg(args, 
char *);
   892     bool mixed_version = va_arg(args, 
int);
   895         out->list_item(out, 
"Current DC",
   896                        "%s (version %s) - %spartition %s quorum",
   897                        dc_name, dc_version_s ? dc_version_s : 
"unknown",
   898                        mixed_version ? 
"MIXED-VERSION " : 
"",
   901         out->list_item(out, 
"Current DC", 
"NONE");
   912     const char *quorum = va_arg(args, 
const char *);
   913     const char *dc_version_s = va_arg(args, 
const char *);
   914     char *dc_name G_GNUC_UNUSED = va_arg(args, 
char *);
   915     bool mixed_version = va_arg(args, 
int);
   920                                      "version", dc_version_s ? dc_version_s : 
"",
   924                                      "mixed_version", pcmk__btoa(mixed_version),
   938     unsigned long long flags = va_arg(args, 
unsigned long long);
   958     out->list_item(out, NULL, 
"STONITH of failed nodes %s",
   961     out->list_item(out, NULL, 
"Cluster is %s",
   966             out->list_item(out, NULL, 
"No quorum policy: Freeze resources");
   970             out->list_item(out, NULL, 
"No quorum policy: Stop ALL resources");
   974             out->list_item(out, NULL, 
"No quorum policy: Demote promotable "   975                            "resources and stop all other resources");
   979             out->list_item(out, NULL, 
"No quorum policy: Ignore");
   983             out->list_item(out, NULL, 
"No quorum policy: Suicide");
   993                               " (the cluster will not attempt to start, stop, or recover services)");
  1000                               " (the cluster will keep all resources stopped)");
  1002         out->list_item(out, NULL, 
"Resource management: enabled");
  1014         return out->info(out, 
"Resource management is DISABLED.  The cluster will not attempt to start, stop or recover services.");
  1016         return out->info(out, 
"Resource management is DISABLED.  The cluster has stopped all resources.");
  1027     out->list_item(out, NULL, 
"STONITH of failed nodes %s",
  1030     out->list_item(out, NULL, 
"Cluster is %s",
  1035             out->list_item(out, NULL, 
"No quorum policy: Freeze resources");
  1039             out->list_item(out, NULL, 
"No quorum policy: Stop ALL resources");
  1043             out->list_item(out, NULL, 
"No quorum policy: Demote promotable "  1044                            "resources and stop all other resources");
  1048             out->list_item(out, NULL, 
"No quorum policy: Ignore");
  1052             out->list_item(out, NULL, 
"No quorum policy: Suicide");
  1064     const char *no_quorum_policy = NULL;
  1070             no_quorum_policy = 
"freeze";
  1074             no_quorum_policy = 
"stop";
  1078             no_quorum_policy = 
"demote";
  1082             no_quorum_policy = 
"ignore";
  1086             no_quorum_policy = 
"suicide";
  1093                                  "no-quorum-policy", no_quorum_policy,
  1096                                  "stonith-timeout-ms", stonith_timeout_str,
  1097                                  "priority-fencing-delay-ms", priority_fencing_delay_str,
  1099     free(stonith_timeout_str);
  1100     free(priority_fencing_delay_str);
  1105 PCMK__OUTPUT_ARGS(
"cluster-stack", 
"const char *", 
"enum pcmk_pacemakerd_state")
  1108     const char *stack_s = va_arg(args, 
const char *);
  1126 PCMK__OUTPUT_ARGS(
"cluster-stack", 
"const char *", 
"enum pcmk_pacemakerd_state")
  1129     const char *stack_s = va_arg(args, 
const char *);
  1134         out->list_item(out, 
"Stack", 
"%s (%s)",
  1137         out->list_item(out, 
"Stack", 
"%s", stack_s);
  1143 PCMK__OUTPUT_ARGS(
"cluster-stack", 
"const char *", 
"enum pcmk_pacemakerd_state")
  1146     const char *stack_s = va_arg(args, 
const char *);
  1150     const char *state_s = NULL;
  1158                                  "pacemakerd-state", state_s,
  1165                   "const char *", 
"const char *", 
"const char *")
  1168     const char *our_nodename = va_arg(args, 
const char *);
  1169     const char *last_written = va_arg(args, 
const char *);
  1170     const char *user = va_arg(args, 
const char *);
  1171     const char *client = va_arg(args, 
const char *);
  1172     const char *origin = va_arg(args, 
const char *);
  1182     if (our_nodename != NULL) {
  1188     time_s = last_changed_string(last_written, user, client, origin);
  1198                   "const char *", 
"const char *", 
"const char *")
  1201     const char *our_nodename = va_arg(args, 
const char *);
  1202     const char *last_written = va_arg(args, 
const char *);
  1203     const char *user = va_arg(args, 
const char *);
  1204     const char *client = va_arg(args, 
const char *);
  1205     const char *origin = va_arg(args, 
const char *);
  1211                                  "origin", our_nodename,
  1215                                  "time", last_written ? last_written : 
"",
  1216                                  "user", user ? user : 
"",
  1217                                  "client", client ? client : 
"",
  1218                                  "origin", origin ? origin : 
"",
  1226                   "const char *", 
"const char *", 
"const char *")
  1229     const char *our_nodename = va_arg(args, 
const char *);
  1230     const char *last_written = va_arg(args, 
const char *);
  1231     const char *user = va_arg(args, 
const char *);
  1232     const char *client = va_arg(args, 
const char *);
  1233     const char *origin = va_arg(args, 
const char *);
  1237     out->list_item(out, 
"Last updated", 
"%s%s%s",
  1238                    time_s, (our_nodename != NULL)? 
" on " : 
"",
  1239                    pcmk__s(our_nodename, 
""));
  1242     time_s = last_changed_string(last_written, user, client, origin);
  1244     out->list_item(out, 
"Last change", 
" %s", time_s);
  1264 failed_action_friendly(
pcmk__output_t *out, 
const xmlNode *xml_op,
  1265                        const char *op_key, 
const char *node_name, 
int rc,
  1266                        int status, 
const char *exit_reason,
  1267                        const char *exec_time)
  1269     char *rsc_id = NULL;
  1271     guint interval_ms = 0;
  1272     time_t last_change_epoch = 0;
  1273     GString *str = NULL;
  1275     if (pcmk__str_empty(op_key)
  1276         || !
parse_op_key(op_key, &rsc_id, &task, &interval_ms)) {
  1277         rsc_id = strdup(
"unknown resource");
  1278         task = strdup(
"unknown action");
  1281     CRM_ASSERT((rsc_id != NULL) && (task != NULL));
  1283     str = g_string_sized_new(256); 
  1287     if (interval_ms != 0) {
  1291     pcmk__g_strcat(str, crm_action_str(task, interval_ms), 
" on ", node_name,
  1295         pcmk__g_strcat(str, 
" returned '", services_ocf_exitcode_str(rc), 
"'",
  1297         if (!pcmk__str_empty(exit_reason)) {
  1303                        pcmk_exec_status_str(status), NULL);
  1304         if (!pcmk__str_empty(exit_reason)) {
  1307         g_string_append_c(str, 
')');
  1312                                 &last_change_epoch) == 
pcmk_ok) {
  1318     if (!pcmk__str_empty(exec_time)) {
  1319         int exec_time_ms = 0;
  1322             && (exec_time_ms > 0)) {
  1329     out->
list_item(out, NULL, 
"%s", str->str);
  1330     g_string_free(str, TRUE);
  1349 failed_action_technical(
pcmk__output_t *out, 
const xmlNode *xml_op,
  1350                         const char *op_key, 
const char *node_name, 
int rc,
  1351                         int status, 
const char *exit_reason,
  1352                         const char *exec_time)
  1356     const char *exit_status = services_ocf_exitcode_str(rc);
  1357     const char *lrm_status = pcmk_exec_status_str(status);
  1358     time_t last_change_epoch = 0;
  1359     GString *str = NULL;
  1361     if (pcmk__str_empty(op_key)) {
  1362         op_key = 
"unknown operation";
  1364     if (pcmk__str_empty(exit_status)) {
  1365         exit_status = 
"unknown exit status";
  1367     if (pcmk__str_empty(call_id)) {
  1368         call_id = 
"unknown";
  1371     str = g_string_sized_new(256);
  1373     g_string_append_printf(str, 
"%s on %s '%s' (%d): call=%s, status='%s'",
  1374                            op_key, node_name, exit_status, rc, call_id,
  1377     if (!pcmk__str_empty(exit_reason)) {
  1382                                 &last_change_epoch) == 
pcmk_ok) {
  1387                        "'", last_change_str, 
"'", NULL);
  1388         free(last_change_str);
  1390     if (!pcmk__str_empty(queue_time)) {
  1393     if (!pcmk__str_empty(exec_time)) {
  1397     out->
list_item(out, NULL, 
"%s", str->str);
  1398     g_string_free(str, TRUE);
  1405     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  1406     uint32_t show_opts = va_arg(args, uint32_t);
  1408     const char *op_key = pe__xe_history_key(xml_op);
  1422     if (pcmk__str_empty(node_name)) {
  1423         node_name = 
"unknown node";
  1427         failed_action_technical(out, xml_op, op_key, node_name, rc, status,
  1428                                 exit_reason, exec_time);
  1430         failed_action_friendly(out, xml_op, op_key, node_name, rc, status,
  1431                                exit_reason, exec_time);
  1439     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  1440     uint32_t show_opts G_GNUC_UNUSED = va_arg(args, uint32_t);
  1442     const char *op_key = pe__xe_history_key(xml_op);
  1443     const char *op_key_name = 
"op_key";
  1450     char *reason_s = 
crm_xml_escape(exit_reason ? exit_reason : 
"none");
  1451     xmlNodePtr node = NULL;
  1457     rc_s = pcmk__itoa(rc);
  1462                                         op_key_name, op_key,
  1464                                         "exitstatus", services_ocf_exitcode_str(rc),
  1465                                         "exitreason", pcmk__s(reason_s, 
""),
  1468                                         "status", pcmk_exec_status_str(status),
  1473                                  &epoch) == 
pcmk_ok) && (epoch > 0)) {
  1474         guint interval_ms = 0;
  1475         char *interval_ms_s = NULL;
  1487                            "interval", interval_ms_s,
  1491         free(interval_ms_s);
  1500                   "GList *", 
"uint32_t", 
"bool")
  1504     GList *only_node = va_arg(args, GList *);
  1505     GList *only_rsc = va_arg(args, GList *);
  1506     uint32_t show_opts = va_arg(args, uint32_t);
  1507     bool print_spacer = va_arg(args, 
int);
  1509     xmlNode *xml_op = NULL;
  1516     for (xml_op = pcmk__xml_first_child(
data_set->
failed); xml_op != NULL;
  1517          xml_op = pcmk__xml_next(xml_op)) {
  1529         if (!
parse_op_key(pe__xe_history_key(xml_op), &rsc, NULL, NULL)) {
  1541         out->message(out, 
"failed-action", xml_op, show_opts);
  1563                               " (in standby due to on-fail,"  1564                               " with active resources)");
  1567                               " (in standby due to on-fail)");
  1570                               " (in standby, with active resources)");
  1578                               " (in maintenance mode)");
  1584                               " (health is RED)");
  1585     } 
else if (health == 0) {
  1587                               " (health is YELLOW)");
  1592         const char *feature_set = get_node_feature_set(node);
  1593         if (feature_set != NULL) {
  1602                   "GList *", 
"GList *")
  1606     uint32_t show_opts = va_arg(args, uint32_t);
  1607     bool full = va_arg(args, 
int);
  1608     GList *only_node = va_arg(args, GList *);
  1609     GList *only_rsc = va_arg(args, GList *);
  1614         xmlNodePtr item_node;
  1619             out->begin_list(out, NULL, NULL, 
"%s:", node_name);
  1622             status_node(node, item_node, show_opts);
  1626                 out->begin_list(out, NULL, NULL, 
"Resources");
  1638             out->begin_list(out, NULL, NULL, 
"%s:", node_name);
  1641             status_node(node, item_node, show_opts);
  1648                 out->message(out, crm_map_element_name(rsc->
xml), show_opts,
  1649                              rsc, only_node, only_rsc);
  1661             status_node(node, item_node, show_opts);
  1666         out->begin_list(out, NULL, NULL, 
"%s:", node_name);
  1686             return "UNCLEAN (online)";
  1689             return "UNCLEAN (pending)";
  1692             return "UNCLEAN (offline)";
  1699         return "standby (on-fail)";
  1704                 return "standby (with active resources)";
  1709             return "OFFLINE (standby)";
  1714             return "maintenance";
  1716             return "OFFLINE (maintenance)";
  1726 PCMK__OUTPUT_ARGS(
"node", 
"pe_node_t *", 
"uint32_t", 
"bool", 
"GList *", 
"GList *")
  1730     uint32_t show_opts = va_arg(args, uint32_t);
  1731     bool full = va_arg(args, 
int);
  1732     GList *only_node = va_arg(args, GList *);
  1733     GList *only_rsc = va_arg(args, GList *);
  1737         GString *str = g_string_sized_new(64);
  1742             g_string_append(str, 
"GuestNode");
  1744             g_string_append(str, 
"RemoteNode");
  1746             g_string_append(str, 
"Node");
  1748         pcmk__g_strcat(str, 
" ", node_name, 
": ", node_text_status(node), NULL);
  1751             g_string_append(str, 
" (health is RED)");
  1752         } 
else if (health == 0) {
  1753             g_string_append(str, 
" (health is YELLOW)");
  1756             const char *feature_set = get_node_feature_set(node);
  1757             if (feature_set != NULL) {
  1769                     out->begin_list(out, NULL, NULL, 
"%s", str->str);
  1770                     out->begin_list(out, NULL, NULL, 
"Resources");
  1781                 GList *gIter2 = NULL;
  1783                 out->begin_list(out, NULL, NULL, 
"%s", str->str);
  1784                 out->begin_list(out, NULL, NULL, 
"Resources");
  1790                     out->message(out, crm_map_element_name(rsc->
xml), show_opts,
  1791                                  rsc, only_node, only_rsc);
  1798             out->list_item(out, NULL, 
"%s", str->str);
  1801         g_string_free(str, TRUE);
  1805         out->begin_list(out, NULL, NULL, 
"Node: %s", node_name);
  1812 PCMK__OUTPUT_ARGS(
"node", 
"pe_node_t *", 
"uint32_t", 
"bool", 
"GList *", 
"GList *")
  1816     uint32_t show_opts G_GNUC_UNUSED = va_arg(args, uint32_t);
  1817     bool full = va_arg(args, 
int);
  1818     GList *only_node = va_arg(args, GList *);
  1819     GList *only_rsc = va_arg(args, GList *);
  1825         const char *health_s = NULL;
  1826         const char *feature_set;
  1842         } 
else if (health == 0) {
  1843             health_s = 
"yellow";
  1848         feature_set = get_node_feature_set(node);
  1860                                  "feature_set", feature_set,
  1864                                  "resources_running", length_s,
  1879                 out->message(out, crm_map_element_name(rsc->
xml), show_opts,
  1880                              rsc, only_node, only_rsc);
  1896 PCMK__OUTPUT_ARGS(
"node-attribute", 
"const char *", 
"const char *", 
"bool", 
"int")
  1899     const char *
name = va_arg(args, 
const char *);
  1900     const char *value = va_arg(args, 
const char *);
  1901     bool add_extra = va_arg(args, 
int);
  1902     int expected_score = va_arg(args, 
int);
  1907         if (value == NULL) {
  1913             out->list_item(out, NULL, 
"%-32s\t: %-10s\t: Connectivity is lost", 
name, value);
  1914         } 
else if (v < expected_score) {
  1915             out->list_item(out, NULL, 
"%-32s\t: %-10s\t: Connectivity is degraded (Expected=%d)", 
name, value, expected_score);
  1917             out->list_item(out, NULL, 
"%-32s\t: %-10s", 
name, value);
  1920         out->list_item(out, NULL, 
"%-32s\t: %-10s", 
name, value);
  1926 PCMK__OUTPUT_ARGS(
"node-attribute", 
"const char *", 
"const char *", 
"bool", 
"int")
  1929     const char *
name = va_arg(args, 
const char *);
  1930     const char *value = va_arg(args, 
const char *);
  1931     bool add_extra = va_arg(args, 
int);
  1932     int expected_score = va_arg(args, 
int);
  1939         if (value == NULL) {
  1950         } 
else if (v < expected_score) {
  1951             char *buf = 
crm_strdup_printf(
"(connectivity is degraded -- expected %d", expected_score);
  1956         out->list_item(out, NULL, 
"%s: %s", 
name, value);
  1966     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  1969     gchar *node_str = NULL;
  1970     char *last_change_str = NULL;
  1974     time_t last_change = 0;
  1982         const pe_node_t *node = pe__current_node(rsc);
  1991                                               show_opts, target_role, 
false);
  2004     out->list_item(out, NULL, 
"%s: %s (node=%s, call=%s, rc=%s%s): %s",
  2005                    node_str, pe__xe_history_key(xml_op),
  2009                    last_change_str ? last_change_str : 
"",
  2010                    pcmk_exec_status_str(status));
  2013     free(last_change_str);
  2021     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  2026     time_t last_change = 0;
  2027     xmlNode *node = NULL;
  2032                                         "op", pe__xe_history_key(xml_op),
  2036                                         "status", pcmk_exec_status_str(status),
  2044         char *agent_tuple = NULL;
  2051                            "agent", agent_tuple,
  2067 PCMK__OUTPUT_ARGS(
"node-attribute", 
"const char *", 
"const char *", 
"bool", 
"int")
  2070     const char *
name = va_arg(args, 
const char *);
  2071     const char *value = va_arg(args, 
const char *);
  2072     bool add_extra = va_arg(args, 
int);
  2073     int expected_score = va_arg(args, 
int);
  2081         char *buf = pcmk__itoa(expected_score);
  2090                   "bool", 
"GList *", 
"GList *")
  2094     uint32_t show_opts = va_arg(args, uint32_t);
  2095     bool print_spacer = va_arg(args, 
int);
  2096     GList *only_node = va_arg(args, GList *);
  2097     GList *only_rsc = va_arg(args, GList *);
  2102     for (GList *gIter = 
data_set->
nodes; gIter != NULL; gIter = gIter->next) {
  2105         GList *attr_list = NULL;
  2106         GHashTableIter iter;
  2114         while (g_hash_table_iter_next (&iter, &key, NULL)) {
  2115             attr_list = filter_attr_list(attr_list, key);
  2118         if (attr_list == NULL) {
  2123             g_list_free(attr_list);
  2129         out->message(out, 
"node", node, show_opts, 
false, only_node, only_rsc);
  2131         for (GList *aIter = attr_list; aIter != NULL; aIter = aIter->next) {
  2132             const char *
name = aIter->data;
  2133             const char *value = NULL;
  2134             int expected_score = 0;
  2135             bool add_extra = 
false;
  2143             out->message(out, 
"node-attribute", 
name, value, add_extra,
  2147         g_list_free(attr_list);
  2160     const char *comment = va_arg(args, 
const char *);
  2163                                         comment, pe__node_name(node));
  2166     out->list_item(out, NULL, 
"%s", dump_text);
  2177     const char *comment = va_arg(args, 
const char *);
  2189                   "GList *", 
"GList *", 
"uint32_t", 
"uint32_t")
  2194     xmlNode *node_state = va_arg(args, xmlNode *);
  2195     GList *only_node = va_arg(args, GList *);
  2196     GList *only_rsc = va_arg(args, GList *);
  2197     uint32_t section_opts = va_arg(args, uint32_t);
  2198     uint32_t show_opts = va_arg(args, uint32_t);
  2200     xmlNode *lrm_rsc = NULL;
  2201     xmlNode *rsc_entry = NULL;
  2236             time_t last_failure = 0;
  2240             if (failcount <= 0) {
  2246                 out->message(out, 
"node", node, show_opts, 
false, only_node,
  2250             out->message(out, 
"resource-history", rsc, rsc_id, 
false,
  2251                          failcount, last_failure, 
false);
  2253             GList *op_list = get_operation_list(rsc_entry);
  2257             if (op_list == NULL) {
  2263                 out->message(out, 
"node", node, show_opts, 
false, only_node,
  2267             out->message(out, 
"resource-operation-list", 
data_set, rsc, node,
  2268                          op_list, show_opts);
  2276 PCMK__OUTPUT_ARGS(
"node-list", 
"GList *", 
"GList *", 
"GList *", 
"uint32_t", 
"bool")
  2279     GList *nodes = va_arg(args, GList *);
  2280     GList *only_node = va_arg(args, GList *);
  2281     GList *only_rsc = va_arg(args, GList *);
  2282     uint32_t show_opts = va_arg(args, uint32_t);
  2283     bool print_spacer G_GNUC_UNUSED = va_arg(args, 
int);
  2287     for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
  2297         out->message(out, 
"node", node, show_opts, 
true, only_node, only_rsc);
  2304 PCMK__OUTPUT_ARGS(
"node-list", 
"GList *", 
"GList *", 
"GList *", 
"uint32_t", 
"bool")
  2307     GList *nodes = va_arg(args, GList *);
  2308     GList *only_node = va_arg(args, GList *);
  2309     GList *only_rsc = va_arg(args, GList *);
  2310     uint32_t show_opts = va_arg(args, uint32_t);
  2311     bool print_spacer = va_arg(args, 
int);
  2314     GString *online_nodes = NULL;
  2315     GString *online_remote_nodes = NULL;
  2316     GString *online_guest_nodes = NULL;
  2317     GString *offline_nodes = NULL;
  2318     GString *offline_remote_nodes = NULL;
  2322     for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
  2346                 pcmk__add_word(&online_guest_nodes, 1024, node_name);
  2349                 pcmk__add_word(&online_remote_nodes, 1024, node_name);
  2352                 pcmk__add_word(&online_nodes, 1024, node_name);
  2360                 pcmk__add_word(&offline_remote_nodes, 1024, node_name);
  2366                 pcmk__add_word(&offline_nodes, 1024, node_name);
  2373         out->message(out, 
"node", node, show_opts, 
true, only_node, only_rsc);
  2378     if (online_nodes != NULL) {
  2379         out->list_item(out, 
"Online", 
"[ %s ]",
  2380                        (
const char *) online_nodes->str);
  2381         g_string_free(online_nodes, TRUE);
  2383     if (offline_nodes != NULL) {
  2384         out->list_item(out, 
"OFFLINE", 
"[ %s ]",
  2385                        (
const char *) offline_nodes->str);
  2386         g_string_free(offline_nodes, TRUE);
  2388     if (online_remote_nodes) {
  2389         out->list_item(out, 
"RemoteOnline", 
"[ %s ]",
  2390                        (
const char *) online_remote_nodes->str);
  2391         g_string_free(online_remote_nodes, TRUE);
  2393     if (offline_remote_nodes) {
  2394         out->list_item(out, 
"RemoteOFFLINE", 
"[ %s ]",
  2395                        (
const char *) offline_remote_nodes->str);
  2396         g_string_free(offline_remote_nodes, TRUE);
  2398     if (online_guest_nodes != NULL) {
  2399         out->list_item(out, 
"GuestOnline", 
"[ %s ]",
  2400                        (
const char *) online_guest_nodes->str);
  2401         g_string_free(online_guest_nodes, TRUE);
  2408 PCMK__OUTPUT_ARGS(
"node-list", 
"GList *", 
"GList *", 
"GList *", 
"uint32_t", 
"bool")
  2411     GList *nodes = va_arg(args, GList *);
  2412     GList *only_node = va_arg(args, GList *);
  2413     GList *only_rsc = va_arg(args, GList *);
  2414     uint32_t show_opts = va_arg(args, uint32_t);
  2415     bool print_spacer G_GNUC_UNUSED = va_arg(args, 
int);
  2417     out->begin_list(out, NULL, NULL, 
"nodes");
  2418     for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
  2426         out->message(out, 
"node", node, show_opts, 
true, only_node, only_rsc);
  2434                   "uint32_t", 
"uint32_t", 
"bool")
  2438     GList *only_node = va_arg(args, GList *);
  2439     GList *only_rsc = va_arg(args, GList *);
  2440     uint32_t section_opts = va_arg(args, uint32_t);
  2441     uint32_t show_opts = va_arg(args, uint32_t);
  2442     bool print_spacer = va_arg(args, 
int);
  2444     xmlNode *node_state = NULL;
  2449     if (xmlChildElementCount(cib_status) == 0) {
  2469         out->message(out, 
"node-history-list", 
data_set, node, node_state,
  2470                      only_node, only_rsc, section_opts, show_opts);
  2478                   "const char *", 
"const char *")
  2483     const char *prefix = va_arg(args, 
const char *);
  2484     const char *
uname = va_arg(args, 
const char *);
  2485     const char *score = va_arg(args, 
const char *);
  2488         out->list_item(out, NULL, 
"%s: %s allocation score on %s: %s",
  2489                        prefix, rsc->
id, 
uname, score);
  2491         out->list_item(out, NULL, 
"%s: %s = %s", prefix, 
uname, score);
  2498                   "const char *", 
"const char *")
  2503     const char *prefix = va_arg(args, 
const char *);
  2504     const char *
uname = va_arg(args, 
const char *);
  2505     const char *score = va_arg(args, 
const char *);
  2520 PCMK__OUTPUT_ARGS(
"op-history", 
"xmlNodePtr", 
"const char *", 
"const char *", 
"int", 
"uint32_t")
  2523     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  2524     const char *task = va_arg(args, 
const char *);
  2525     const char *interval_ms_s = va_arg(args, 
const char *);
  2526     int rc = va_arg(args, 
int);
  2527     uint32_t show_opts = va_arg(args, uint32_t);
  2529     char *buf = op_history_string(xml_op, task, interval_ms_s, rc,
  2532     out->list_item(out, NULL, 
"%s", buf);
  2538 PCMK__OUTPUT_ARGS(
"op-history", 
"xmlNodePtr", 
"const char *", 
"const char *", 
"int", 
"uint32_t")
  2541     xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
  2542     const char *task = va_arg(args, 
const char *);
  2543     const char *interval_ms_s = va_arg(args, 
const char *);
  2544     int rc = va_arg(args, 
int);
  2545     uint32_t show_opts = va_arg(args, uint32_t);
  2547     char *rc_s = pcmk__itoa(rc);
  2552                                                    "rc_text", services_ocf_exitcode_str(rc),
  2556     if (interval_ms_s && !pcmk__str_eq(interval_ms_s, 
"0", 
pcmk__str_casei)) {
  2563         const char *value = NULL;
  2567                                      &epoch) == 
pcmk_ok) && (epoch > 0)) {
  2590 PCMK__OUTPUT_ARGS(
"promotion-score", 
"pe_resource_t *", 
"pe_node_t *", 
"const char *")
  2596     const char *score = va_arg(args, 
const char *);
  2598     out->list_item(out, NULL, 
"%s promotion score on %s: %s",
  2605 PCMK__OUTPUT_ARGS(
"promotion-score", 
"pe_resource_t *", 
"pe_node_t *", 
"const char *")
  2611     const char *score = va_arg(args, 
const char *);
  2614                                                    "id", child_rsc->
id,
  2629     bool raw = va_arg(args, 
int);
  2631     char *rsc_xml = formatted_xml_buf(rsc, raw);
  2633     out->output_xml(out, 
"xml", rsc_xml);
  2643     bool raw = va_arg(args, 
int);
  2645     char *rsc_xml = formatted_xml_buf(rsc, raw);
  2648     out->output_xml(out, 
"xml", rsc_xml);
  2654 PCMK__OUTPUT_ARGS(
"resource-history", 
"pe_resource_t *", 
"const char *", 
"bool", 
"int", 
"time_t", 
"bool")
  2658     const char *rsc_id = va_arg(args, 
const char *);
  2659     bool all = va_arg(args, 
int);
  2660     int failcount = va_arg(args, 
int);
  2661     time_t last_failure = va_arg(args, time_t);
  2662     bool as_header = va_arg(args, 
int);
  2664     char *buf = resource_history_string(rsc, rsc_id, all, failcount, last_failure);
  2667         out->begin_list(out, NULL, NULL, 
"%s", buf);
  2669         out->list_item(out, NULL, 
"%s", buf);
  2676 PCMK__OUTPUT_ARGS(
"resource-history", 
"pe_resource_t *", 
"const char *", 
"bool", 
"int", 
"time_t", 
"bool")
  2680     const char *rsc_id = va_arg(args, 
const char *);
  2681     bool all = va_arg(args, 
int);
  2682     int failcount = va_arg(args, 
int);
  2683     time_t last_failure = va_arg(args, time_t);
  2684     bool as_header = va_arg(args, 
int);
  2692     } 
else if (all || failcount || last_failure > 0) {
  2696                            "migration-threshold", migration_s,
  2700         if (failcount > 0) {
  2701             char *s = pcmk__itoa(failcount);
  2707         if (last_failure > 0) {
  2727         out->
begin_list(out, NULL, NULL, 
"Inactive Resources");
  2729         out->
begin_list(out, NULL, NULL, 
"Full List of Resources");
  2731         out->
begin_list(out, NULL, NULL, 
"Active Resources");
  2737                   "GList *", 
"GList *", 
"bool")
  2742     uint32_t show_opts = va_arg(args, uint32_t);
  2743     bool print_summary = va_arg(args, 
int);
  2744     GList *only_node = va_arg(args, GList *);
  2745     GList *only_rsc = va_arg(args, GList *);
  2746     bool print_spacer = va_arg(args, 
int);
  2750     bool printed_header = 
false;
  2766         print_resource_header(out, show_opts);
  2767         printed_header = 
true;
  2774     for (rsc_iter = 
data_set->
resources; rsc_iter != NULL; rsc_iter = rsc_iter->next) {
  2779         gboolean is_active = rsc->
fns->
active(rsc, TRUE);
  2780         gboolean partially_active = rsc->
fns->
active(rsc, FALSE);
  2806         if (!printed_header) {
  2808             print_resource_header(out, show_opts);
  2809             printed_header = 
true;
  2813         x = out->message(out, crm_map_element_name(rsc->
xml), show_opts, rsc,
  2814                          only_node, only_rsc);
  2821         if (!printed_header) {
  2823             print_resource_header(out, show_opts);
  2824             printed_header = 
true;
  2828             out->list_item(out, NULL, 
"No inactive resources");
  2830             out->list_item(out, NULL, 
"No resources");
  2832             out->list_item(out, NULL, 
"No active resources");
  2836     if (printed_header) {
  2844                   "pe_node_t *", 
"GList *", 
"uint32_t")
  2851     GList *op_list = va_arg(args, GList *);
  2852     uint32_t show_opts = va_arg(args, uint32_t);
  2854     GList *gIter = NULL;
  2858     for (gIter = op_list; gIter != NULL; gIter = gIter->next) {
  2859         xmlNode *xml_op = (xmlNode *) gIter->data;
  2876             time_t last_failure = 0;
  2881                          failcount, last_failure, 
true);
  2886         out->message(out, 
"op-history", xml_op, task, interval_ms_s,
  2887                      op_rc_i, show_opts);
  2891     g_list_free(op_list);
  2897 PCMK__OUTPUT_ARGS(
"resource-util", 
"pe_resource_t *", 
"pe_node_t *", 
"const char *")
  2903     const char *fn = va_arg(args, 
const char *);
  2906                                         fn, rsc->
id, pe__node_name(node));
  2908     g_hash_table_foreach(rsc->
utilization, append_dump_text, &dump_text);
  2909     out->list_item(out, NULL, 
"%s", dump_text);
  2915 PCMK__OUTPUT_ARGS(
"resource-util", 
"pe_resource_t *", 
"pe_node_t *", 
"const char *")
  2921     const char *fn = va_arg(args, 
const char *);
  2924                                                        "resource", rsc->
id,
  2928     g_hash_table_foreach(rsc->
utilization, add_dump_node, xml_node);
  2941         out->list_item(out, NULL, 
"%s:\t%s%s %s=\"%s\"", ticket->
id,
  2942                        ticket->
granted ? 
"granted" : 
"revoked",
  2943                        ticket->
standby ? 
" [standby]" : 
"",
  2944                        "last-granted", pcmk__s(epoch_str, 
""));
  2947         out->list_item(out, NULL, 
"%s:\t%s%s", ticket->
id,
  2948                        ticket->
granted ? 
"granted" : 
"revoked",
  2949                        ticket->
standby ? 
" [standby]" : 
"");
  2963         out->list_item(out, ticket->
id, 
"%s%s %s=\"%s\"",
  2964                        ticket->
granted ? 
"granted" : 
"revoked",
  2965                        ticket->
standby ? 
" [standby]" : 
"",
  2966                        "last-granted", pcmk__s(epoch_str, 
""));
  2969         out->list_item(out, ticket->
id, 
"%s%s",
  2970                        ticket->
granted ? 
"granted" : 
"revoked",
  2971                        ticket->
standby ? 
" [standby]" : 
"");
  2982     xmlNodePtr node = NULL;
  2986                                         "status", ticket->
granted ? 
"granted" : 
"revoked",
  2987                                         "standby", pcmk__btoa(ticket->
standby),
  3004     bool print_spacer = va_arg(args, 
int);
  3006     GHashTableIter iter;
  3007     gpointer key, value;
  3016     out->begin_list(out, NULL, NULL, 
"Tickets");
  3020     while (g_hash_table_iter_next(&iter, &key, &value)) {
  3022         out->message(out, 
"ticket", ticket);
  3031     { 
"ban", 
"default", ban_text },
  3032     { 
"ban", 
"html", ban_html },
  3033     { 
"ban", 
"xml", ban_xml },
  3034     { 
"ban-list", 
"default", ban_list },
  3040     { 
"cluster-counts", 
"default", cluster_counts_text },
  3041     { 
"cluster-counts", 
"html", cluster_counts_html },
  3042     { 
"cluster-counts", 
"xml", cluster_counts_xml },
  3043     { 
"cluster-dc", 
"default", cluster_dc_text },
  3044     { 
"cluster-dc", 
"html", cluster_dc_html },
  3045     { 
"cluster-dc", 
"xml", cluster_dc_xml },
  3046     { 
"cluster-options", 
"default", cluster_options_text },
  3047     { 
"cluster-options", 
"html", cluster_options_html },
  3048     { 
"cluster-options", 
"log", cluster_options_log },
  3049     { 
"cluster-options", 
"xml", cluster_options_xml },
  3050     { 
"cluster-summary", 
"default", cluster_summary },
  3051     { 
"cluster-summary", 
"html", cluster_summary_html },
  3052     { 
"cluster-stack", 
"default", cluster_stack_text },
  3053     { 
"cluster-stack", 
"html", cluster_stack_html },
  3054     { 
"cluster-stack", 
"xml", cluster_stack_xml },
  3055     { 
"cluster-times", 
"default", cluster_times_text },
  3056     { 
"cluster-times", 
"html", cluster_times_html },
  3057     { 
"cluster-times", 
"xml", cluster_times_xml },
  3058     { 
"failed-action", 
"default", failed_action_default },
  3059     { 
"failed-action", 
"xml", failed_action_xml },
  3060     { 
"failed-action-list", 
"default", failed_action_list },
  3063     { 
"maint-mode", 
"text", cluster_maint_mode_text },
  3064     { 
"node", 
"default", node_text },
  3065     { 
"node", 
"html", node_html },
  3066     { 
"node", 
"xml", node_xml },
  3067     { 
"node-and-op", 
"default", node_and_op },
  3068     { 
"node-and-op", 
"xml", node_and_op_xml },
  3069     { 
"node-capacity", 
"default", node_capacity },
  3070     { 
"node-capacity", 
"xml", node_capacity_xml },
  3071     { 
"node-history-list", 
"default", node_history_list },
  3072     { 
"node-list", 
"default", node_list_text },
  3073     { 
"node-list", 
"html", node_list_html },
  3074     { 
"node-list", 
"xml", node_list_xml },
  3075     { 
"node-weight", 
"default", node_weight },
  3076     { 
"node-weight", 
"xml", node_weight_xml },
  3077     { 
"node-attribute", 
"default", node_attribute_text },
  3078     { 
"node-attribute", 
"html", node_attribute_html },
  3079     { 
"node-attribute", 
"xml", node_attribute_xml },
  3080     { 
"node-attribute-list", 
"default", node_attribute_list },
  3081     { 
"node-summary", 
"default", node_summary },
  3082     { 
"op-history", 
"default", op_history_text },
  3083     { 
"op-history", 
"xml", op_history_xml },
  3087     { 
"promotion-score", 
"default", promotion_score },
  3088     { 
"promotion-score", 
"xml", promotion_score_xml },
  3089     { 
"resource-config", 
"default", resource_config },
  3090     { 
"resource-config", 
"text", resource_config_text },
  3091     { 
"resource-history", 
"default", resource_history_text },
  3092     { 
"resource-history", 
"xml", resource_history_xml },
  3093     { 
"resource-list", 
"default", resource_list },
  3094     { 
"resource-operation-list", 
"default", resource_operation_list },
  3095     { 
"resource-util", 
"default", resource_util },
  3096     { 
"resource-util", 
"xml", resource_util_xml },
  3097     { 
"ticket", 
"default", ticket_text },
  3098     { 
"ticket", 
"html", ticket_html },
  3099     { 
"ticket", 
"xml", ticket_xml },
  3100     { 
"ticket-list", 
"default", ticket_list },
  3102     { NULL, NULL, NULL }
 int pe__node_health(pe_node_t *node)
 
#define CRM_CHECK(expr, failure_action)
 
void pcmk__output_xml_push_parent(pcmk__output_t *out, xmlNodePtr parent)
 
#define XML_RSC_OP_LAST_CHANGE
 
#define XML_ATTR_UPDATE_ORIG
 
enum rsc_role_e role_filter
 
enum pe_quorum_policy no_quorum_policy
 
gboolean parse_op_key(const char *key, char **rsc_id, char **op_type, guint *interval_ms)
 
#define XML_ATTR_UPDATE_CLIENT
 
bool pe__is_guest_or_remote_node(const pe_node_t *node)
 
Control output from tools. 
 
void pcmk__register_messages(pcmk__output_t *out, const pcmk__message_entry_t *table)
 
int pcmk__scan_min_int(const char *text, int *result, int minimum)
 
#define crm_time_log_timeofday
 
pe_resource_t * container
 
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
 
#define pe_flag_symmetric_cluster
 
int priority_fencing_delay
 
xmlNode * first_named_child(const xmlNode *parent, const char *name)
 
#define pe_flag_maintenance_mode
 
xmlNode * pcmk_create_html_node(xmlNode *parent, const char *element_name, const char *id, const char *class_name, const char *text)
 
#define XML_ATTR_UPDATE_USER
 
int pe__group_default(pcmk__output_t *out, va_list args)
 
xmlNode * find_xml_node(const xmlNode *root, const char *search_path, gboolean must_find)
 
pe_resource_t * remote_rsc
 
#define CRMD_ACTION_NOTIFY
 
#define XML_RSC_OP_T_EXEC
 
resource_object_functions_t * fns
 
#define XML_LRM_TAG_RESOURCE
 
int pe__name_and_nvpairs_xml(pcmk__output_t *out, bool is_list, const char *tag_name, size_t pairs_count,...)
 
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. 
 
int pe__clone_default(pcmk__output_t *out, va_list args)
 
xmlNodePtr pcmk__output_xml_peek_parent(pcmk__output_t *out)
 
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
 
#define RSC_ROLE_PROMOTED_LEGACY_S
 
void pcmk__xe_set_bool_attr(xmlNodePtr node, const char *name, bool value)
 
const pe_resource_t * pe__const_top_resource(const pe_resource_t *rsc, bool include_bundle)
 
pe_resource_t * pe_find_resource(GList *rsc_list, const char *id_rh)
 
enum crm_ais_msg_types type
 
bool pe__rsc_running_on_any(pe_resource_t *rsc, GList *node_list)
 
xmlNodePtr pcmk__output_create_html_node(pcmk__output_t *out, const char *element_name, const char *id, const char *class_name, const char *text)
 
int pe__resource_text(pcmk__output_t *out, va_list args)
 
#define XML_RSC_OP_T_QUEUE
 
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
 
#define PCMK__LAST_FAILURE_PREFIX
 
int pe__bundle_html(pcmk__output_t *out, va_list args)
 
void void void pcmk__formatted_printf(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
 
#define pe_flag_stop_everything
 
GList * pe__filter_rsc_list(GList *rscs, GList *filter)
 
char * pcmk__format_nvpair(const char *name, const char *value, const char *units)
 
#define PCMK__OUTPUT_SPACER_IF(out_obj, cond)
 
#define XML_LRM_ATTR_TASK_KEY
 
bool pe__is_remote_node(const pe_node_t *node)
 
#define XML_LRM_ATTR_TASK
 
const char * pe__resource_description(const pe_resource_t *rsc, uint32_t show_opts)
 
bool pcmk_xe_mask_probe_failure(const xmlNode *xml_op)
 
#define CRM_ATTR_FEATURE_SET
 
int crm_element_value_ms(const xmlNode *data, const char *name, guint *dest)
Retrieve the millisecond value of an XML attribute. 
 
int pe__rscs_brief_output(pcmk__output_t *out, GList *rsc_list, unsigned int options)
 
int pe__bundle_text(pcmk__output_t *out, va_list args)
 
Used only to initialize variables. 
 
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute. 
 
const char * pe_node_attribute_raw(const pe_node_t *node, const char *name)
 
#define XML_CIB_TAG_STATE
 
bool pe__is_guest_node(const pe_node_t *node)
 
xmlNode * pcmk_find_cib_element(xmlNode *cib, const char *element_name)
Find an element in the CIB. 
 
char * pe__node_display_name(pe_node_t *node, bool print_detail)
 
xmlNode * pcmk_create_xml_text_node(xmlNode *parent, const char *name, const char *content)
 
int pe__clone_xml(pcmk__output_t *out, va_list args)
 
void pcmk__g_strcat(GString *buffer,...) G_GNUC_NULL_TERMINATED
 
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. 
 
struct pe_node_shared_s * details
 
#define XML_AGENT_ATTR_PROVIDER
 
#define XML_ATTR_HAVE_QUORUM
 
pe_working_set_t * data_set
 
xmlNode * create_xml_node(xmlNode *parent, const char *name)
 
Action completed, result is known. 
 
char * dump_xml_formatted(xmlNode *msg)
 
xmlNodePtr pcmk__output_create_xml_node(pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED
 
#define pe_flag_stonith_enabled
 
gchar * pcmk__native_output_string(const pe_resource_t *rsc, const char *name, const pe_node_t *node, uint32_t show_opts, const char *target_role, bool show_nodes)
 
int crm_element_value_epoch(const xmlNode *xml, const char *name, time_t *dest)
Retrieve the seconds-since-epoch value of an XML attribute. 
 
#define PCMK__FAIL_COUNT_PREFIX
 
#define XML_RSC_ATTR_TARGET_ROLE
 
#define XML_LRM_ATTR_EXIT_REASON
 
#define crm_time_log_with_timezone
 
enum pe_obj_types variant
 
gboolean(* is_filtered)(const pe_resource_t *, GList *, gboolean)
 
void pcmk__output_xml_pop_parent(pcmk__output_t *out)
 
#define RSC_ROLE_PROMOTED_S
 
void pcmk__xe_set_props(xmlNodePtr node,...) G_GNUC_NULL_TERMINATED
 
int pe__resource_xml(pcmk__output_t *out, va_list args)
 
const xmlChar * pcmkXmlStr
 
#define PCMK__OUTPUT_LIST_FOOTER(out_obj, retcode)
 
int pe__bundle_xml(pcmk__output_t *out, va_list args)
 
pe_node_t * pe_find_node_id(const GList *node_list, const char *id)
Find a node by ID in a list of nodes. 
 
const char * rsc_printable_id(const pe_resource_t *rsc)
 
#define PCMK__OUTPUT_LIST_HEADER(out_obj, cond, retcode, title...)
 
#define XML_LRM_TAG_RESOURCES
 
const char * pcmk_pacemakerd_api_daemon_state_enum2text(enum pcmk_pacemakerd_state state)
 
void(*) void(* list_item)(pcmk__output_t *out, const char *name, const char *format,...) G_GNUC_PRINTF(3
 
char * pcmk__epoch2str(const time_t *source, uint32_t flags)
 
#define XML_CIB_ATTR_WRITTEN
 
int pe__group_xml(pcmk__output_t *out, va_list args)
 
This structure contains everything that makes up a single output formatter. 
 
GHashTable * pe_rsc_params(pe_resource_t *rsc, const pe_node_t *node, pe_working_set_t *data_set)
Get a table of resource parameters. 
 
#define XML_LRM_ATTR_INTERVAL_MS
 
#define XML_LRM_ATTR_CALLID
 
#define XML_NVPAIR_ATTR_VALUE
 
void(* begin_list)(pcmk__output_t *out, const char *singular_noun, const char *plural_noun, const char *format,...) G_GNUC_PRINTF(4
 
#define XML_LRM_ATTR_OPSTATUS
 
int pe__resource_html(pcmk__output_t *out, va_list args)
 
const char * pcmk__pcmkd_state_enum2friendly(enum pcmk_pacemakerd_state state)
 
#define pcmk__plural_s(i)
 
rsc_role_e
Possible roles that a resource can be in. 
 
GList * placement_constraints
 
#define XML_CIB_TAG_STATUS
 
const char * pcmk__readable_interval(guint interval_ms)
 
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard. 
 
gboolean crm_is_true(const char *s)
 
char * pcmk__trim(char *str)
 
#define XML_LRM_TAG_RSC_OP
 
char * crm_xml_escape(const char *text)
Replace special characters with their XML escape sequences. 
 
int pe_get_failcount(const pe_node_t *node, pe_resource_t *rsc, time_t *last_failure, uint32_t flags, const xmlNode *xml_op)
 
void pe__register_messages(pcmk__output_t *out)
 
#define crm_time_log_date
 
gboolean(* active)(pe_resource_t *, gboolean)
 
PCMK__OUTPUT_ARGS("cluster-summary", "pe_working_set_t *", "enum pcmk_pacemakerd_state", "uint32_t", "uint32_t")
 
#define XML_AGENT_ATTR_CLASS
 
gboolean pcmk__str_in_list(const gchar *s, const GList *lst, uint32_t flags)
 
#define CRMD_ACTION_STATUS
 
xmlNode * crm_next_same_xml(const xmlNode *sibling)
Get next instance of same XML tag.