17 #include <libxml/tree.h> 22 gboolean dependents) {
29 rsc->
id, score, dependents ?
"needs" :
"with",
33 rsc->
id, score, cons->
id);
44 xmlNodePtr node = NULL;
78 for (lpc = list; lpc != NULL; lpc = lpc->next) {
83 for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
109 "pe_node_t *",
"pe_node_t *",
"pe_action_t *",
114 const char *change = va_arg(args,
const char *);
123 char *details = NULL;
124 bool same_host = FALSE;
125 bool same_role = FALSE;
126 bool need_role = FALSE;
128 static int rsc_width = 5;
129 static int detail_width = 5;
132 CRM_ASSERT(destination != NULL || origin != NULL);
138 len = strlen(rsc->
id);
139 if(len > rsc_width) {
148 if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
156 if (need_role && (origin == NULL)) {
160 }
else if (origin == NULL) {
164 }
else if (need_role && (destination == NULL)) {
168 }
else if (destination == NULL) {
172 }
else if (need_role && same_role && same_host) {
176 }
else if (same_role && same_host) {
180 }
else if (need_role && same_role) {
184 }
else if (same_role) {
188 }
else if (same_host) {
197 len = strlen(details);
198 if(len > detail_width) {
205 }
else if(source->
reason) {
209 reason = strdup(
"blocked");
213 out->list_item(out, NULL,
"%-8s %-*s ( %*s )%s%s", change, rsc_width,
214 rsc->
id, detail_width, details, reason ?
" " :
"", reason ? reason :
"");
222 "pe_node_t *",
"pe_node_t *",
"pe_action_t *",
227 const char *change = va_arg(args,
const char *);
234 char *change_str = NULL;
236 bool same_host = FALSE;
237 bool same_role = FALSE;
238 bool need_role = FALSE;
242 CRM_ASSERT(destination != NULL || origin != NULL);
244 if (source == NULL) {
253 if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
261 change_str = g_ascii_strdown(change, -1);
263 "action", change_str,
268 if (need_role && (origin == NULL)) {
276 }
else if (origin == NULL) {
280 }
else if (need_role && (destination == NULL)) {
287 }
else if (destination == NULL) {
291 }
else if (need_role && same_role && same_host) {
298 }
else if (same_role && same_host) {
302 }
else if (need_role && same_role) {
310 }
else if (same_role) {
317 }
else if (same_host) {
341 }
else if(source->
reason) {
356 gboolean recursive = va_arg(args, gboolean);
365 for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
372 out->list_item(out, NULL,
"%s (id=%s - loop)",
377 hdr = colocations_header(cons->
primary, cons, FALSE);
378 out->list_item(out, NULL,
"%s", hdr);
382 out->begin_list(out, NULL, NULL, NULL);
384 out->message(out,
"locations-list", cons->
primary);
386 out->message(out,
"rsc-is-colocated-with-list",
399 rsc_is_colocated_with_list_xml(
pcmk__output_t *out, va_list args) {
401 gboolean recursive = va_arg(args, gboolean);
410 for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
414 colocations_xml_node(out, cons->
primary, cons);
418 colocations_xml_node(out, cons->
primary, cons);
419 do_locations_list_xml(out, cons->
primary,
false);
422 out->message(out,
"rsc-is-colocated-with-list",
434 gboolean recursive = va_arg(args, gboolean);
443 for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
450 out->list_item(out, NULL,
"%s (id=%s - loop)",
455 hdr = colocations_header(cons->
dependent, cons, TRUE);
456 out->list_item(out, NULL,
"%s", hdr);
460 out->begin_list(out, NULL, NULL, NULL);
462 out->message(out,
"locations-list", cons->
dependent);
464 out->message(out,
"rscs-colocated-with-list",
479 gboolean recursive = va_arg(args, gboolean);
488 for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
492 colocations_xml_node(out, cons->
dependent, cons);
496 colocations_xml_node(out, cons->
dependent, cons);
497 do_locations_list_xml(out, cons->
dependent,
false);
500 out->message(out,
"rscs-colocated-with-list",
517 for (lpc = list; lpc != NULL; lpc = lpc->next) {
522 for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
527 out->list_item(out, NULL,
"Node %s (score=%s, id=%s, rsc=%s)",
541 return do_locations_list_xml(out, rsc,
true);
544 PCMK__OUTPUT_ARGS(
"stacks-constraints",
"pe_resource_t *",
"pe_working_set_t *",
"gboolean")
549 gboolean recursive = va_arg(args, gboolean);
556 out->message(out,
"locations-list", rsc);
559 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
562 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
566 PCMK__OUTPUT_ARGS(
"stacks-constraints",
"pe_resource_t *",
"pe_working_set_t *",
"gboolean")
571 gboolean recursive = va_arg(args, gboolean);
579 do_locations_list_xml(out, rsc,
false);
582 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
585 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
591 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
"const char *")
595 const char *sys_from G_GNUC_UNUSED = va_arg(args,
const char *);
596 const char *host_from = va_arg(args,
const char *);
597 const char *fsa_state = va_arg(args,
const char *);
598 const char *result = va_arg(args,
const char *);
600 if (!out->is_quiet(out)) {
601 return out->info(out,
"Controller on %s in state %s: %s",
crm_str(host_from),
603 }
else if (fsa_state != NULL) {
611 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
"const char *")
615 const char *sys_from = va_arg(args,
const char *);
616 const char *host_from = va_arg(args,
const char *);
617 const char *fsa_state = va_arg(args,
const char *);
618 const char *result = va_arg(args,
const char *);
621 "node_name",
crm_str(host_from),
628 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
"const char *",
"const char *")
632 const char *sys_from = va_arg(args,
const char *);
633 const char *state = va_arg(args,
const char *);
634 const char *last_updated = va_arg(args,
const char *);
636 if (!out->is_quiet(out)) {
637 return out->info(out,
"Status of %s: '%s' %s %s",
crm_str(sys_from),
638 crm_str(state), (!pcmk__str_empty(last_updated))?
639 "last updated":
"",
crm_str(last_updated));
648 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
"const char *",
"const char *")
652 const char *sys_from = va_arg(args,
const char *);
653 const char *state = va_arg(args,
const char *);
654 const char *last_updated = va_arg(args,
const char *);
658 "last_updated",
crm_str(last_updated),
666 const char *xml_file = va_arg(args,
const char *);
667 clock_t start = va_arg(args, clock_t);
668 clock_t end = va_arg(args, clock_t);
670 out->list_item(out, NULL,
"Testing %s ... %.2f secs", xml_file,
671 (end - start) / (
float) CLOCKS_PER_SEC);
679 const char *xml_file = va_arg(args,
const char *);
680 clock_t start = va_arg(args, clock_t);
681 clock_t end = va_arg(args, clock_t);
683 char *duration = pcmk__ftoa((end - start) / (
float) CLOCKS_PER_SEC);
687 "duration", duration,
698 const char *dc = va_arg(args,
const char *);
700 if (!out->is_quiet(out)) {
701 return out->info(out,
"Designated Controller is: %s",
crm_str(dc));
702 }
else if (dc != NULL) {
714 const char *dc = va_arg(args,
const char *);
722 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
"const char *",
"gboolean")
726 const char *
type = va_arg(args,
const char *);
727 const char *
name = va_arg(args,
const char *);
728 const char *
id = va_arg(args,
const char *);
729 gboolean BASH_EXPORT = va_arg(args, gboolean);
731 if (out->is_quiet(out)) {
734 }
else if (BASH_EXPORT) {
737 return out->info(out,
"%s node: %s (%s)",
type ?
type :
"cluster",
742 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
"const char *",
"gboolean")
746 const char *
type = va_arg(args,
const char *);
747 const char *
name = va_arg(args,
const char *);
748 const char *
id = va_arg(args,
const char *);
759 "guint",
"op_digest_cache_t *")
765 const char *task = va_arg(args,
const char *);
766 guint interval_ms = va_arg(args, guint);
769 char *action_desc = NULL;
770 const char *rsc_desc =
"unknown resource";
771 const char *node_desc =
"unknown node";
773 if (interval_ms != 0) {
775 ((task == NULL)?
"unknown" : task));
777 action_desc = strdup(
"probe action");
780 ((task == NULL)?
"unknown" : task));
782 if ((rsc != NULL) && (rsc->
id != NULL)) {
788 out->begin_list(out, NULL, NULL,
"Digests for %s %s on %s",
789 rsc_desc, action_desc, node_desc);
792 if (digests == NULL) {
793 out->list_item(out, NULL,
"none");
798 out->list_item(out, NULL,
"%s (all parameters)",
802 out->list_item(out, NULL,
"%s (non-private parameters)",
806 out->list_item(out, NULL,
"%s (non-reloadable parameters)",
814 add_digest_xml(xmlNode *parent,
const char *
type,
const char *digest,
815 xmlNode *digest_source)
817 if (digest != NULL) {
822 if (digest_source != NULL) {
829 "guint",
"op_digest_cache_t *")
835 const char *task = va_arg(args,
const char *);
836 guint interval_ms = va_arg(args, guint);
846 "interval", interval_s,
849 if (digests != NULL) {
860 #define STOP_SANITY_ASSERT(lineno) do { \ 861 if(current && current->details->unclean) { \ 863 } else if(stop == NULL) { \ 864 crm_err("%s:%d: No stop action exists for %s", \ 865 __func__, lineno, rsc->id); \ 866 CRM_ASSERT(stop != NULL); \ 867 } else if (pcmk_is_set(stop->flags, pe_action_optional)) { \ 868 crm_err("%s:%d: Action %s is still optional", \ 869 __func__, lineno, stop->uuid); \ 870 CRM_ASSERT(!pcmk_is_set(stop->flags, pe_action_optional)); \ 882 gboolean moving = va_arg(args, gboolean);
884 GList *possible_matches = NULL;
895 || (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);
924 if (possible_matches) {
925 promote = possible_matches->data;
926 g_list_free(possible_matches);
930 if (possible_matches) {
931 demote = possible_matches->data;
932 g_list_free(possible_matches);
939 if (possible_matches) {
940 migrate_op = possible_matches->data;
945 }
else if ((migrate_op != NULL) && (current != NULL)
947 rc = out->message(out,
"rsc-action-item",
"Migrate", rsc, current,
951 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current,
955 if ((demote != NULL) && (promote != NULL)
958 rc = out->message(out,
"rsc-action-item",
"Re-promote", rsc,
959 current, next, promote, demote);
966 rc = out->message(out,
"rsc-action-item",
"Stop", rsc, current,
967 NULL, stop, (stop && stop->
reason)? stop : start);
970 }
else if (moving && current) {
972 rsc, current, next, stop, NULL);
975 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
980 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
985 g_list_free(possible_matches);
996 for (gIter = rsc->
running_on; gIter != NULL; gIter = gIter->next) {
1001 if (possible_matches) {
1002 stop_op = possible_matches->data;
1003 g_list_free(possible_matches);
1010 if (out->message(out,
"rsc-action-item",
"Stop", rsc, node, NULL,
1011 stop_op, (stop_op && stop_op->reason)? stop_op : start) ==
pcmk_rc_ok) {
1018 }
else if ((stop != NULL)
1021 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
1025 }
else if (moving) {
1026 rc = out->message(out,
"rsc-action-item",
"Move", rsc, current, next,
1031 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current, next,
1035 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
1041 rc = out->message(out,
"rsc-action-item",
"Demote", rsc, current,
1042 next, demote, NULL);
1046 rc = out->message(out,
"rsc-action-item",
"Promote", rsc, current,
1047 next, promote, NULL);
1050 rc = out->message(out,
"rsc-action-item",
"Start", rsc, current, next,
1061 char *task = va_arg(args,
char *);
1062 char *node_name = va_arg(args,
char *);
1063 char *reason = va_arg(args,
char *);
1067 }
else if (reason) {
1068 out->list_item(out, NULL,
"%s %s '%s'", task, node_name, reason);
1080 char *task = va_arg(args,
char *);
1081 char *node_name = va_arg(args,
char *);
1082 char *reason = va_arg(args,
char *);
1086 }
else if (reason) {
1099 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
"xmlNodePtr")
1103 const char *node = va_arg(args,
const char *);
1104 const char *task = va_arg(args,
const char *);
1105 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1107 if (out->is_quiet(out)) {
1112 out->list_item(out, NULL,
"Cluster action: %s for %s on %s", task,
ID(rsc), node);
1114 out->list_item(out, NULL,
"Cluster action: %s on %s", task, node);
1120 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
"xmlNodePtr")
1124 const char *node = va_arg(args,
const char *);
1125 const char *task = va_arg(args,
const char *);
1126 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1128 xmlNodePtr xml_node = NULL;
1130 if (out->is_quiet(out)) {
1150 char *
target = va_arg(args,
char *);
1151 const char *op = va_arg(args,
const char *);
1153 if (out->is_quiet(out)) {
1157 out->list_item(out, NULL,
"Fencing %s (%s)",
target, op);
1165 char *
target = va_arg(args,
char *);
1166 const char *op = va_arg(args,
const char *);
1168 if (out->is_quiet(out)) {
1183 const char *
name = va_arg(args,
const char *);
1184 const char *value = va_arg(args,
const char *);
1185 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1187 xmlChar *node_path = NULL;
1189 if (out->is_quiet(out)) {
1193 node_path = xmlGetNodePath(cib_node);
1195 out->list_item(out, NULL,
"Injecting attribute %s=%s into %s '%s'",
1196 name, value, node_path,
ID(cib_node));
1206 const char *
name = va_arg(args,
const char *);
1207 const char *value = va_arg(args,
const char *);
1208 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1210 xmlChar *node_path = NULL;
1212 if (out->is_quiet(out)) {
1216 node_path = xmlGetNodePath(cib_node);
1221 "node_path", node_path,
1222 "cib_node",
ID(cib_node),
1232 char *spec = va_arg(args,
char *);
1234 if (out->is_quiet(out)) {
1238 out->list_item(out, NULL,
"Injecting %s into the configuration", spec);
1246 char *spec = va_arg(args,
char *);
1248 if (out->is_quiet(out)) {
1262 const char *quorum = va_arg(args,
const char *);
1263 const char *watchdog = va_arg(args,
const char *);
1265 if (out->is_quiet(out)) {
1269 out->begin_list(out, NULL, NULL,
"Performing Requested Modifications");
1272 out->list_item(out, NULL,
"Setting quorum: %s", quorum);
1276 out->list_item(out, NULL,
"Setting watchdog: %s", watchdog);
1286 const char *quorum = va_arg(args,
const char *);
1287 const char *watchdog = va_arg(args,
const char *);
1289 xmlNodePtr node = NULL;
1291 if (out->is_quiet(out)) {
1312 const char *
action = va_arg(args,
const char *);
1313 char *node = va_arg(args,
char *);
1315 if (out->is_quiet(out)) {
1320 out->list_item(out, NULL,
"Bringing node %s online", node);
1323 out->list_item(out, NULL,
"Taking node %s offline", node);
1326 out->list_item(out, NULL,
"Failing node %s", node);
1337 const char *
action = va_arg(args,
const char *);
1338 char *node = va_arg(args,
char *);
1340 if (out->is_quiet(out)) {
1355 const char *
action = va_arg(args,
const char *);
1356 char *ticket = va_arg(args,
char *);
1358 if (out->is_quiet(out)) {
1363 out->list_item(out, NULL,
"Making ticket %s standby", ticket);
1365 out->list_item(out, NULL,
"%s ticket %s",
action, ticket);
1375 const char *
action = va_arg(args,
const char *);
1376 char *ticket = va_arg(args,
char *);
1378 if (out->is_quiet(out)) {
1393 const char *node = va_arg(args,
const char *);
1394 const char *task = va_arg(args,
const char *);
1396 if (out->is_quiet(out)) {
1400 out->list_item(out, NULL,
"Pseudo action: %s%s%s", task, node ?
" on " :
"",
1409 const char *node = va_arg(args,
const char *);
1410 const char *task = va_arg(args,
const char *);
1412 xmlNodePtr xml_node = NULL;
1414 if (out->is_quiet(out)) {
1428 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
"char *",
"guint")
1432 const char *rsc = va_arg(args,
const char *);
1433 const char *operation = va_arg(args,
const char *);
1434 char *node = va_arg(args,
char *);
1435 guint interval_ms = va_arg(args, guint);
1437 if (out->is_quiet(out)) {
1442 out->list_item(out, NULL,
"Resource action: %-15s %s=%u on %s",
1443 rsc, operation, interval_ms, node);
1445 out->list_item(out, NULL,
"Resource action: %-15s %s on %s",
1446 rsc, operation, node);
1452 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
"char *",
"guint")
1456 const char *rsc = va_arg(args,
const char *);
1457 const char *operation = va_arg(args,
const char *);
1458 char *node = va_arg(args,
char *);
1459 guint interval_ms = va_arg(args, guint);
1461 xmlNodePtr xml_node = NULL;
1463 if (out->is_quiet(out)) {
1474 char *interval_s = pcmk__itoa(interval_ms);
1483 #define CHECK_RC(retcode, retval) \ 1484 if (retval == pcmk_rc_ok) { \ 1485 retcode = pcmk_rc_ok; \ 1489 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1497 gboolean fence_history = va_arg(args, gboolean);
1498 unsigned int section_opts = va_arg(args,
unsigned int);
1499 unsigned int show_opts = va_arg(args,
unsigned int);
1500 const char *prefix = va_arg(args,
const char *);
1501 GList *unames = va_arg(args, GList *);
1502 GList *resources = va_arg(args, GList *);
1505 bool already_printed_failure =
false;
1507 CHECK_RC(
rc, out->message(out,
"cluster-summary", data_set,
1508 section_opts, show_opts));
1517 CHECK_RC(
rc, out->message(out,
"resource-list", data_set, show_opts,
1523 CHECK_RC(
rc, out->message(out,
"node-attribute-list", data_set,
1531 CHECK_RC(
rc, out->message(out,
"node-summary", data_set, unames,
1532 resources, section_opts, show_opts,
rc ==
pcmk_rc_ok));
1539 CHECK_RC(
rc, out->message(out,
"failed-action-list", data_set, unames,
1545 if (history_rc == 0) {
1550 CHECK_RC(
rc, out->message(out,
"failed-fencing-list", stonith_history, unames,
1555 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1556 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1560 already_printed_failure =
true;
1571 CHECK_RC(
rc, out->message(out,
"ban-list", data_set, prefix, resources,
1577 if (history_rc != 0) {
1578 if (!already_printed_failure) {
1580 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1581 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1590 CHECK_RC(
rc, out->message(out,
"fencing-list", hp, unames,
1597 CHECK_RC(
rc, out->message(out,
"pending-fencing-list", hp, unames,
1606 PCMK__OUTPUT_ARGS(
"cluster-status",
"pe_working_set_t *",
"crm_exit_t",
"stonith_history_t *",
1607 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1615 gboolean fence_history = va_arg(args, gboolean);
1616 unsigned int section_opts = va_arg(args,
unsigned int);
1617 unsigned int show_opts = va_arg(args,
unsigned int);
1618 const char *prefix = va_arg(args,
const char *);
1619 GList *unames = va_arg(args, GList *);
1620 GList *resources = va_arg(args, GList *);
1622 out->message(out,
"cluster-summary", data_set, section_opts, show_opts);
1626 out->message(out,
"node-list", data_set->
nodes, unames, resources,
1635 out->message(out,
"resource-list", data_set, full_show_opts,
1636 FALSE, unames, resources, FALSE);
1641 out->message(out,
"node-attribute-list", data_set, show_opts, FALSE,
1649 out->message(out,
"node-summary", data_set, unames,
1650 resources, section_opts, show_opts, FALSE);
1657 out->message(out,
"failed-action-list", data_set, unames, resources,
1663 out->message(out,
"full-fencing-list", history_rc, stonith_history,
1664 unames, section_opts, FALSE);
1669 out->message(out,
"ticket-list", data_set, FALSE);
1674 out->message(out,
"ban-list", data_set, prefix, resources, show_opts,
1681 PCMK__OUTPUT_ARGS(
"cluster-status",
"pe_working_set_t *",
"crm_exit_t",
"stonith_history_t *",
1682 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1690 gboolean fence_history = va_arg(args, gboolean);
1691 unsigned int section_opts = va_arg(args,
unsigned int);
1692 unsigned int show_opts = va_arg(args,
unsigned int);
1693 const char *prefix = va_arg(args,
const char *);
1694 GList *unames = va_arg(args, GList *);
1695 GList *resources = va_arg(args, GList *);
1696 bool already_printed_failure =
false;
1698 out->message(out,
"cluster-summary", data_set, section_opts, show_opts);
1702 out->message(out,
"node-list", data_set->
nodes, unames, resources,
1708 out->message(out,
"resource-list", data_set, show_opts, TRUE, unames,
1714 out->message(out,
"node-attribute-list", data_set, show_opts, FALSE,
1722 out->message(out,
"node-summary", data_set, unames,
1723 resources, section_opts, show_opts, FALSE);
1730 out->message(out,
"failed-action-list", data_set, unames, resources,
1736 if (history_rc == 0) {
1741 out->message(out,
"failed-fencing-list", stonith_history, unames,
1742 section_opts, FALSE);
1745 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1746 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1754 if (history_rc != 0) {
1755 if (!already_printed_failure) {
1756 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1757 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1766 out->message(out,
"fencing-list", hp, unames, section_opts, FALSE);
1772 out->message(out,
"pending-fencing-list", hp, unames,
1773 section_opts, FALSE);
1780 out->message(out,
"ticket-list", data_set, FALSE);
1785 out->message(out,
"ban-list", data_set, prefix, resources, show_opts,
1794 {
"cluster-status",
"html", cluster_status_html },
1795 {
"cluster-status",
"xml", cluster_status_xml },
1796 {
"crmadmin-node",
"default", crmadmin_node_text },
1797 {
"crmadmin-node",
"xml", crmadmin_node_xml },
1798 {
"dc",
"default", dc_text },
1799 {
"dc",
"xml", dc_xml },
1800 {
"digests",
"default", digests_text },
1801 {
"digests",
"xml", digests_xml },
1802 {
"health",
"default", health_text },
1803 {
"health",
"xml", health_xml },
1804 {
"inject-attr",
"default", inject_attr },
1805 {
"inject-attr",
"xml", inject_attr_xml },
1806 {
"inject-cluster-action",
"default", inject_cluster_action },
1807 {
"inject-cluster-action",
"xml", inject_cluster_action_xml },
1808 {
"inject-fencing-action",
"default", inject_fencing_action },
1809 {
"inject-fencing-action",
"xml", inject_fencing_action_xml },
1810 {
"inject-modify-config",
"default", inject_modify_config },
1811 {
"inject-modify-config",
"xml", inject_modify_config_xml },
1812 {
"inject-modify-node",
"default", inject_modify_node },
1813 {
"inject-modify-node",
"xml", inject_modify_node_xml },
1814 {
"inject-modify-ticket",
"default", inject_modify_ticket },
1815 {
"inject-modify-ticket",
"xml", inject_modify_ticket_xml },
1816 {
"inject-pseudo-action",
"default", inject_pseudo_action },
1817 {
"inject-pseudo-action",
"xml", inject_pseudo_action_xml },
1818 {
"inject-rsc-action",
"default", inject_rsc_action },
1819 {
"inject-rsc-action",
"xml", inject_rsc_action_xml },
1820 {
"inject-spec",
"default", inject_spec },
1821 {
"inject-spec",
"xml", inject_spec_xml },
1822 {
"locations-list",
"default", locations_list },
1823 {
"locations-list",
"xml", locations_list_xml },
1824 {
"node-action",
"default", node_action },
1825 {
"node-action",
"xml", node_action_xml },
1826 {
"pacemakerd-health",
"default", pacemakerd_health_text },
1827 {
"pacemakerd-health",
"xml", pacemakerd_health_xml },
1828 {
"profile",
"default", profile_default, },
1829 {
"profile",
"xml", profile_xml },
1830 {
"rsc-action",
"default", rsc_action_default },
1831 {
"rsc-action-item",
"default", rsc_action_item },
1832 {
"rsc-action-item",
"xml", rsc_action_item_xml },
1833 {
"rsc-is-colocated-with-list",
"default", rsc_is_colocated_with_list },
1834 {
"rsc-is-colocated-with-list",
"xml", rsc_is_colocated_with_list_xml },
1835 {
"rscs-colocated-with-list",
"default", rscs_colocated_with_list },
1836 {
"rscs-colocated-with-list",
"xml", rscs_colocated_with_list_xml },
1837 {
"stacks-constraints",
"default", stacks_and_constraints },
1838 {
"stacks-constraints",
"xml", stacks_and_constraints_xml },
1840 { 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
#define XML_CONS_TAG_RSC_DEPEND
enum crm_exit_e crm_exit_t
#define CRM_LOG_ASSERT(expr)
enum crm_ais_msg_types type
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
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...)
#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)