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;
76 for (lpc = list; lpc != NULL; lpc = lpc->next) {
81 for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
107 "pe_node_t *",
"pe_node_t *",
"pe_action_t *",
112 const char *change = va_arg(args,
const char *);
121 char *details = NULL;
122 bool same_host = FALSE;
123 bool same_role = FALSE;
124 bool need_role = FALSE;
126 static int rsc_width = 5;
127 static int detail_width = 5;
130 CRM_ASSERT(destination != NULL || origin != NULL);
136 len = strlen(rsc->
id);
137 if(len > rsc_width) {
146 if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
154 if (need_role && (origin == NULL)) {
158 }
else if (origin == NULL) {
162 }
else if (need_role && (destination == NULL)) {
166 }
else if (destination == NULL) {
170 }
else if (need_role && same_role && same_host) {
174 }
else if (same_role && same_host) {
178 }
else if (need_role && same_role) {
182 }
else if (same_role) {
186 }
else if (same_host) {
195 len = strlen(details);
196 if(len > detail_width) {
203 }
else if(source->
reason) {
207 reason = strdup(
"blocked");
211 out->list_item(out, NULL,
"%-8s %-*s ( %*s )%s%s", change, rsc_width,
212 rsc->
id, detail_width, details, reason ?
" " :
"", reason ? reason :
"");
220 "pe_node_t *",
"pe_node_t *",
"pe_action_t *",
225 const char *change = va_arg(args,
const char *);
232 char *change_str = NULL;
234 bool same_host = FALSE;
235 bool same_role = FALSE;
236 bool need_role = FALSE;
240 CRM_ASSERT(destination != NULL || origin != NULL);
242 if (source == NULL) {
251 if(origin != NULL && destination != NULL && origin->
details == destination->
details) {
259 change_str = g_ascii_strdown(change, -1);
261 "action", change_str,
266 if (need_role && (origin == NULL)) {
274 }
else if (origin == NULL) {
278 }
else if (need_role && (destination == NULL)) {
285 }
else if (destination == NULL) {
289 }
else if (need_role && same_role && same_host) {
296 }
else if (same_role && same_host) {
300 }
else if (need_role && same_role) {
308 }
else if (same_role) {
315 }
else if (same_host) {
339 }
else if(source->
reason) {
354 gboolean recursive = va_arg(args, gboolean);
363 for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
370 out->list_item(out, NULL,
"%s (id=%s - loop)", cons->
rsc_rh->
id, cons->
id);
374 hdr = colocations_header(cons->
rsc_rh, cons, FALSE);
375 out->list_item(out, NULL,
"%s", hdr);
379 out->begin_list(out, NULL, NULL, NULL);
381 out->message(out,
"locations-list", cons->
rsc_rh);
383 out->message(out,
"rsc-is-colocated-with-list", cons->
rsc_rh, recursive);
395 rsc_is_colocated_with_list_xml(
pcmk__output_t *out, va_list args) {
397 gboolean recursive = va_arg(args, gboolean);
406 for (GList *lpc = rsc->
rsc_cons; lpc != NULL; lpc = lpc->next) {
410 colocations_xml_node(out, cons->
rsc_rh, cons);
414 colocations_xml_node(out, cons->
rsc_rh, cons);
415 do_locations_list_xml(out, cons->
rsc_rh,
false);
418 out->message(out,
"rsc-is-colocated-with-list", cons->
rsc_rh, recursive);
429 gboolean recursive = va_arg(args, gboolean);
438 for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
445 out->list_item(out, NULL,
"%s (id=%s - loop)", cons->
rsc_lh->
id, cons->
id);
449 hdr = colocations_header(cons->
rsc_lh, cons, TRUE);
450 out->list_item(out, NULL,
"%s", hdr);
454 out->begin_list(out, NULL, NULL, NULL);
456 out->message(out,
"locations-list", cons->
rsc_lh);
458 out->message(out,
"rscs-colocated-with-list", cons->
rsc_lh, recursive);
472 gboolean recursive = va_arg(args, gboolean);
481 for (GList *lpc = rsc->
rsc_cons_lhs; lpc != NULL; lpc = lpc->next) {
485 colocations_xml_node(out, cons->
rsc_lh, cons);
489 colocations_xml_node(out, cons->
rsc_lh, cons);
490 do_locations_list_xml(out, cons->
rsc_lh,
false);
493 out->message(out,
"rscs-colocated-with-list", cons->
rsc_lh, recursive);
509 for (lpc = list; lpc != NULL; lpc = lpc->next) {
514 for (lpc2 = cons->
node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
519 out->list_item(out, NULL,
"Node %s (score=%s, id=%s, rsc=%s)",
533 return do_locations_list_xml(out, rsc,
true);
536 PCMK__OUTPUT_ARGS(
"stacks-constraints",
"pe_resource_t *",
"pe_working_set_t *",
"gboolean")
541 gboolean recursive = va_arg(args, gboolean);
551 out->message(out,
"locations-list", rsc);
554 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
557 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
561 PCMK__OUTPUT_ARGS(
"stacks-constraints",
"pe_resource_t *",
"pe_working_set_t *",
"gboolean")
566 gboolean recursive = va_arg(args, gboolean);
577 do_locations_list_xml(out, rsc,
false);
580 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
583 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
589 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
"const char *")
593 const char *sys_from G_GNUC_UNUSED = va_arg(args,
const char *);
594 const char *host_from = va_arg(args,
const char *);
595 const char *fsa_state = va_arg(args,
const char *);
596 const char *result = va_arg(args,
const char *);
598 if (!out->is_quiet(out)) {
599 return out->info(out,
"Controller on %s in state %s: %s",
crm_str(host_from),
601 }
else if (fsa_state != NULL) {
609 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
"const char *")
613 const char *sys_from = va_arg(args,
const char *);
614 const char *host_from = va_arg(args,
const char *);
615 const char *fsa_state = va_arg(args,
const char *);
616 const char *result = va_arg(args,
const char *);
619 "node_name",
crm_str(host_from),
626 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
"const char *",
"const char *")
630 const char *sys_from = va_arg(args,
const char *);
631 const char *state = va_arg(args,
const char *);
632 const char *last_updated = va_arg(args,
const char *);
634 if (!out->is_quiet(out)) {
635 return out->info(out,
"Status of %s: '%s' %s %s",
crm_str(sys_from),
636 crm_str(state), (!pcmk__str_empty(last_updated))?
637 "last updated":
"",
crm_str(last_updated));
646 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
"const char *",
"const char *")
650 const char *sys_from = va_arg(args,
const char *);
651 const char *state = va_arg(args,
const char *);
652 const char *last_updated = va_arg(args,
const char *);
656 "last_updated",
crm_str(last_updated),
665 const char *dc = va_arg(args,
const char *);
667 if (!out->is_quiet(out)) {
668 return out->info(out,
"Designated Controller is: %s",
crm_str(dc));
669 }
else if (dc != NULL) {
681 const char *dc = va_arg(args,
const char *);
689 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
"const char *",
"gboolean")
693 const char *
type = va_arg(args,
const char *);
694 const char *
name = va_arg(args,
const char *);
695 const char *
id = va_arg(args,
const char *);
696 gboolean BASH_EXPORT = va_arg(args, gboolean);
698 if (out->is_quiet(out)) {
701 }
else if (BASH_EXPORT) {
704 return out->info(out,
"%s node: %s (%s)",
type ?
type :
"cluster",
709 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
"const char *",
"gboolean")
713 const char *
type = va_arg(args,
const char *);
714 const char *
name = va_arg(args,
const char *);
715 const char *
id = va_arg(args,
const char *);
726 "guint",
"op_digest_cache_t *")
732 const char *task = va_arg(args,
const char *);
733 guint interval_ms = va_arg(args, guint);
736 char *action_desc = NULL;
737 const char *rsc_desc =
"unknown resource";
738 const char *node_desc =
"unknown node";
740 if (interval_ms != 0) {
742 ((task == NULL)?
"unknown" : task));
744 action_desc = strdup(
"probe action");
747 ((task == NULL)?
"unknown" : task));
749 if ((rsc != NULL) && (rsc->
id != NULL)) {
755 out->begin_list(out, NULL, NULL,
"Digests for %s %s on %s",
756 rsc_desc, action_desc, node_desc);
759 if (digests == NULL) {
760 out->list_item(out, NULL,
"none");
765 out->list_item(out, NULL,
"%s (all parameters)",
769 out->list_item(out, NULL,
"%s (non-private parameters)",
773 out->list_item(out, NULL,
"%s (non-reloadable parameters)",
781 add_digest_xml(xmlNode *parent,
const char *
type,
const char *digest,
782 xmlNode *digest_source)
784 if (digest != NULL) {
789 if (digest_source != NULL) {
796 "guint",
"op_digest_cache_t *")
802 const char *task = va_arg(args,
const char *);
803 guint interval_ms = va_arg(args, guint);
813 "interval", interval_s,
816 if (digests != NULL) {
827 #define STOP_SANITY_ASSERT(lineno) do { \ 828 if(current && current->details->unclean) { \ 830 } else if(stop == NULL) { \ 831 crm_err("%s:%d: No stop action exists for %s", \ 832 __func__, lineno, rsc->id); \ 833 CRM_ASSERT(stop != NULL); \ 834 } else if (pcmk_is_set(stop->flags, pe_action_optional)) { \ 835 crm_err("%s:%d: Action %s is still optional", \ 836 __func__, lineno, stop->uuid); \ 837 CRM_ASSERT(!pcmk_is_set(stop->flags, pe_action_optional)); \ 849 gboolean moving = va_arg(args, gboolean);
851 GList *possible_matches = NULL;
862 || (current == NULL && next == NULL)) {
874 if (possible_matches) {
875 start = possible_matches->data;
876 g_list_free(possible_matches);
882 start_node = current;
885 if (possible_matches) {
886 stop = possible_matches->data;
887 g_list_free(possible_matches);
891 if (possible_matches) {
892 promote = possible_matches->data;
893 g_list_free(possible_matches);
897 if (possible_matches) {
898 demote = possible_matches->data;
899 g_list_free(possible_matches);
906 if (possible_matches) {
907 migrate_op = possible_matches->data;
912 }
else if ((migrate_op != NULL) && (current != NULL)
914 rc = out->message(out,
"rsc-action-item",
"Migrate", rsc, current,
918 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current,
922 if ((demote != NULL) && (promote != NULL)
925 rc = out->message(out,
"rsc-action-item",
"Re-promote", rsc,
926 current, next, promote, demote);
933 rc = out->message(out,
"rsc-action-item",
"Stop", rsc, current,
934 NULL, stop, (stop && stop->
reason)? stop : start);
937 }
else if (moving && current) {
939 rsc, current, next, stop, NULL);
942 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
947 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
952 g_list_free(possible_matches);
963 for (gIter = rsc->
running_on; gIter != NULL; gIter = gIter->next) {
968 if (possible_matches) {
969 stop_op = possible_matches->data;
970 g_list_free(possible_matches);
977 if (out->message(out,
"rsc-action-item",
"Stop", rsc, node, NULL,
978 stop_op, (stop_op && stop_op->reason)? stop_op : start) ==
pcmk_rc_ok) {
985 }
else if ((stop != NULL)
988 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
993 rc = out->message(out,
"rsc-action-item",
"Move", rsc, current, next,
998 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current, next,
1002 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
1008 rc = out->message(out,
"rsc-action-item",
"Demote", rsc, current,
1009 next, demote, NULL);
1013 rc = out->message(out,
"rsc-action-item",
"Promote", rsc, current,
1014 next, promote, NULL);
1017 rc = out->message(out,
"rsc-action-item",
"Start", rsc, current, next,
1028 char *task = va_arg(args,
char *);
1029 char *node_name = va_arg(args,
char *);
1030 char *reason = va_arg(args,
char *);
1034 }
else if (reason) {
1035 out->list_item(out, NULL,
"%s %s '%s'", task, node_name, reason);
1047 char *task = va_arg(args,
char *);
1048 char *node_name = va_arg(args,
char *);
1049 char *reason = va_arg(args,
char *);
1053 }
else if (reason) {
1066 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
"xmlNodePtr")
1070 const char *node = va_arg(args,
const char *);
1071 const char *task = va_arg(args,
const char *);
1072 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1074 if (out->is_quiet(out)) {
1079 out->list_item(out, NULL,
"Cluster action: %s for %s on %s", task,
ID(rsc), node);
1081 out->list_item(out, NULL,
"Cluster action: %s on %s", task, node);
1087 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
"xmlNodePtr")
1091 const char *node = va_arg(args,
const char *);
1092 const char *task = va_arg(args,
const char *);
1093 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1095 xmlNodePtr xml_node = NULL;
1097 if (out->is_quiet(out)) {
1117 char *
target = va_arg(args,
char *);
1118 const char *op = va_arg(args,
const char *);
1120 if (out->is_quiet(out)) {
1124 out->list_item(out, NULL,
"Fencing %s (%s)",
target, op);
1132 char *
target = va_arg(args,
char *);
1133 const char *op = va_arg(args,
const char *);
1135 if (out->is_quiet(out)) {
1150 const char *
name = va_arg(args,
const char *);
1151 const char *value = va_arg(args,
const char *);
1152 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1154 xmlChar *node_path = NULL;
1156 if (out->is_quiet(out)) {
1160 node_path = xmlGetNodePath(cib_node);
1162 out->list_item(out, NULL,
"Injecting attribute %s=%s into %s '%s'",
1163 name, value, node_path,
ID(cib_node));
1173 const char *
name = va_arg(args,
const char *);
1174 const char *value = va_arg(args,
const char *);
1175 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1177 xmlChar *node_path = NULL;
1179 if (out->is_quiet(out)) {
1183 node_path = xmlGetNodePath(cib_node);
1188 "node_path", node_path,
1189 "cib_node",
ID(cib_node),
1199 char *spec = va_arg(args,
char *);
1201 if (out->is_quiet(out)) {
1205 out->list_item(out, NULL,
"Injecting %s into the configuration", spec);
1213 char *spec = va_arg(args,
char *);
1215 if (out->is_quiet(out)) {
1229 const char *quorum = va_arg(args,
const char *);
1230 const char *watchdog = va_arg(args,
const char *);
1232 if (out->is_quiet(out)) {
1236 out->begin_list(out, NULL, NULL,
"Performing Requested Modifications");
1239 out->list_item(out, NULL,
"Setting quorum: %s", quorum);
1243 out->list_item(out, NULL,
"Setting watchdog: %s", watchdog);
1253 const char *quorum = va_arg(args,
const char *);
1254 const char *watchdog = va_arg(args,
const char *);
1256 xmlNodePtr node = NULL;
1258 if (out->is_quiet(out)) {
1279 const char *
action = va_arg(args,
const char *);
1280 char *node = va_arg(args,
char *);
1282 if (out->is_quiet(out)) {
1287 out->list_item(out, NULL,
"Bringing node %s online", node);
1290 out->list_item(out, NULL,
"Taking node %s offline", node);
1293 out->list_item(out, NULL,
"Failing node %s", node);
1304 const char *
action = va_arg(args,
const char *);
1305 char *node = va_arg(args,
char *);
1307 if (out->is_quiet(out)) {
1322 const char *
action = va_arg(args,
const char *);
1323 char *ticket = va_arg(args,
char *);
1325 if (out->is_quiet(out)) {
1330 out->list_item(out, NULL,
"Making ticket %s standby", ticket);
1332 out->list_item(out, NULL,
"%s ticket %s",
action, ticket);
1342 const char *
action = va_arg(args,
const char *);
1343 char *ticket = va_arg(args,
char *);
1345 if (out->is_quiet(out)) {
1360 const char *node = va_arg(args,
const char *);
1361 const char *task = va_arg(args,
const char *);
1363 if (out->is_quiet(out)) {
1367 out->list_item(out, NULL,
"Pseudo action: %s%s%s", task, node ?
" on " :
"",
1376 const char *node = va_arg(args,
const char *);
1377 const char *task = va_arg(args,
const char *);
1379 xmlNodePtr xml_node = NULL;
1381 if (out->is_quiet(out)) {
1395 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
"char *",
"guint")
1399 const char *rsc = va_arg(args,
const char *);
1400 const char *operation = va_arg(args,
const char *);
1401 char *node = va_arg(args,
char *);
1402 guint interval_ms = va_arg(args, guint);
1404 if (out->is_quiet(out)) {
1409 out->list_item(out, NULL,
"Resource action: %-15s %s=%u on %s",
1410 rsc, operation, interval_ms, node);
1412 out->list_item(out, NULL,
"Resource action: %-15s %s on %s",
1413 rsc, operation, node);
1419 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
"char *",
"guint")
1423 const char *rsc = va_arg(args,
const char *);
1424 const char *operation = va_arg(args,
const char *);
1425 char *node = va_arg(args,
char *);
1426 guint interval_ms = va_arg(args, guint);
1428 xmlNodePtr xml_node = NULL;
1430 if (out->is_quiet(out)) {
1441 char *interval_s = pcmk__itoa(interval_ms);
1450 #define CHECK_RC(retcode, retval) \ 1451 if (retval == pcmk_rc_ok) { \ 1452 retcode = pcmk_rc_ok; \ 1456 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1464 gboolean fence_history = va_arg(args, gboolean);
1465 unsigned int section_opts = va_arg(args,
unsigned int);
1466 unsigned int show_opts = va_arg(args,
unsigned int);
1467 const char *prefix = va_arg(args,
const char *);
1468 GList *unames = va_arg(args, GList *);
1469 GList *resources = va_arg(args, GList *);
1472 bool already_printed_failure =
false;
1474 CHECK_RC(
rc, out->message(out,
"cluster-summary", data_set,
1475 section_opts, show_opts));
1480 resources, show_opts));
1485 CHECK_RC(
rc, out->message(out,
"resource-list", data_set, show_opts,
1491 CHECK_RC(
rc, out->message(out,
"node-attribute-list", data_set,
1499 CHECK_RC(
rc, out->message(out,
"node-summary", data_set, unames,
1500 resources, section_opts, show_opts,
rc ==
pcmk_rc_ok));
1507 CHECK_RC(
rc, out->message(out,
"failed-action-list", data_set, unames,
1513 if (history_rc == 0) {
1518 CHECK_RC(
rc, out->message(out,
"failed-fencing-list", stonith_history, unames,
1523 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1524 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1528 already_printed_failure =
true;
1539 CHECK_RC(
rc, out->message(out,
"ban-list", data_set, prefix, resources,
1545 if (history_rc != 0) {
1546 if (!already_printed_failure) {
1548 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1549 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1558 CHECK_RC(
rc, out->message(out,
"fencing-list", hp, unames,
1565 CHECK_RC(
rc, out->message(out,
"pending-fencing-list", hp, unames,
1574 PCMK__OUTPUT_ARGS(
"cluster-status",
"pe_working_set_t *",
"crm_exit_t",
"stonith_history_t *",
1575 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1583 gboolean fence_history = va_arg(args, gboolean);
1584 unsigned int section_opts = va_arg(args,
unsigned int);
1585 unsigned int show_opts = va_arg(args,
unsigned int);
1586 const char *prefix = va_arg(args,
const char *);
1587 GList *unames = va_arg(args, GList *);
1588 GList *resources = va_arg(args, GList *);
1590 out->message(out,
"cluster-summary", data_set, section_opts, show_opts);
1594 out->message(out,
"node-list", data_set->
nodes, unames, resources, show_opts);
1602 out->message(out,
"resource-list", data_set, full_show_opts,
1603 FALSE, unames, resources, FALSE);
1608 out->message(out,
"node-attribute-list", data_set, show_opts, FALSE,
1616 out->message(out,
"node-summary", data_set, unames,
1617 resources, section_opts, show_opts, FALSE);
1624 out->message(out,
"failed-action-list", data_set, unames, resources,
1630 out->message(out,
"full-fencing-list", history_rc, stonith_history,
1631 unames, section_opts, FALSE);
1636 out->message(out,
"ticket-list", data_set, FALSE);
1641 out->message(out,
"ban-list", data_set, prefix, resources, show_opts,
1648 PCMK__OUTPUT_ARGS(
"cluster-status",
"pe_working_set_t *",
"crm_exit_t",
"stonith_history_t *",
1649 "gboolean",
"unsigned int",
"unsigned int",
"const char *",
"GList *",
1657 gboolean fence_history = va_arg(args, gboolean);
1658 unsigned int section_opts = va_arg(args,
unsigned int);
1659 unsigned int show_opts = va_arg(args,
unsigned int);
1660 const char *prefix = va_arg(args,
const char *);
1661 GList *unames = va_arg(args, GList *);
1662 GList *resources = va_arg(args, GList *);
1663 bool already_printed_failure =
false;
1665 out->message(out,
"cluster-summary", data_set, section_opts, show_opts);
1669 out->message(out,
"node-list", data_set->
nodes, unames, resources, show_opts);
1674 out->message(out,
"resource-list", data_set, show_opts, TRUE, unames,
1680 out->message(out,
"node-attribute-list", data_set, show_opts, FALSE,
1688 out->message(out,
"node-summary", data_set, unames,
1689 resources, section_opts, show_opts, FALSE);
1696 out->message(out,
"failed-action-list", data_set, unames, resources,
1702 if (history_rc == 0) {
1707 out->message(out,
"failed-fencing-list", stonith_history, unames,
1708 section_opts, FALSE);
1711 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1712 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1720 if (history_rc != 0) {
1721 if (!already_printed_failure) {
1722 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1723 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1732 out->message(out,
"fencing-list", hp, unames, section_opts, FALSE);
1738 out->message(out,
"pending-fencing-list", hp, unames,
1739 section_opts, FALSE);
1746 out->message(out,
"ticket-list", data_set, FALSE);
1751 out->message(out,
"ban-list", data_set, prefix, resources, show_opts,
1760 {
"cluster-status",
"html", cluster_status_html },
1761 {
"cluster-status",
"xml", cluster_status_xml },
1762 {
"crmadmin-node",
"default", crmadmin_node_text },
1763 {
"crmadmin-node",
"xml", crmadmin_node_xml },
1764 {
"dc",
"default", dc_text },
1765 {
"dc",
"xml", dc_xml },
1766 {
"digests",
"default", digests_text },
1767 {
"digests",
"xml", digests_xml },
1768 {
"health",
"default", health_text },
1769 {
"health",
"xml", health_xml },
1770 {
"inject-attr",
"default", inject_attr },
1771 {
"inject-attr",
"xml", inject_attr_xml },
1772 {
"inject-cluster-action",
"default", inject_cluster_action },
1773 {
"inject-cluster-action",
"xml", inject_cluster_action_xml },
1774 {
"inject-fencing-action",
"default", inject_fencing_action },
1775 {
"inject-fencing-action",
"xml", inject_fencing_action_xml },
1776 {
"inject-modify-config",
"default", inject_modify_config },
1777 {
"inject-modify-config",
"xml", inject_modify_config_xml },
1778 {
"inject-modify-node",
"default", inject_modify_node },
1779 {
"inject-modify-node",
"xml", inject_modify_node_xml },
1780 {
"inject-modify-ticket",
"default", inject_modify_ticket },
1781 {
"inject-modify-ticket",
"xml", inject_modify_ticket_xml },
1782 {
"inject-pseudo-action",
"default", inject_pseudo_action },
1783 {
"inject-pseudo-action",
"xml", inject_pseudo_action_xml },
1784 {
"inject-rsc-action",
"default", inject_rsc_action },
1785 {
"inject-rsc-action",
"xml", inject_rsc_action_xml },
1786 {
"inject-spec",
"default", inject_spec },
1787 {
"inject-spec",
"xml", inject_spec_xml },
1788 {
"locations-list",
"default", locations_list },
1789 {
"locations-list",
"xml", locations_list_xml },
1790 {
"node-action",
"default", node_action },
1791 {
"node-action",
"xml", node_action_xml },
1792 {
"pacemakerd-health",
"default", pacemakerd_health_text },
1793 {
"pacemakerd-health",
"xml", pacemakerd_health_xml },
1794 {
"rsc-action",
"default", rsc_action_default },
1795 {
"rsc-action-item",
"default", rsc_action_item },
1796 {
"rsc-action-item",
"xml", rsc_action_item_xml },
1797 {
"rsc-is-colocated-with-list",
"default", rsc_is_colocated_with_list },
1798 {
"rsc-is-colocated-with-list",
"xml", rsc_is_colocated_with_list_xml },
1799 {
"rscs-colocated-with-list",
"default", rscs_colocated_with_list },
1800 {
"rscs-colocated-with-list",
"xml", rscs_colocated_with_list_xml },
1801 {
"stacks-constraints",
"default", stacks_and_constraints },
1802 {
"stacks-constraints",
"xml", stacks_and_constraints_xml },
1804 { 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.
#define XML_CIB_TAG_CONSTRAINTS
GList * find_actions(GList *input, const char *key, const pe_node_t *on_node)
xmlNode * get_object_root(const char *object_type, xmlNode *the_root)
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)
gboolean unpack_constraints(xmlNode *xml_constraints, pe_working_set_t *data_set)
#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
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)