17 #include <libxml/tree.h> 31 (dependents?
"needs" :
"with"),
46 const char *dependent_role = NULL;
47 const char *primary_role = NULL;
75 lpc != NULL; lpc = lpc->next) {
80 for (lpc2 = cons->
nodes; lpc2 != NULL; lpc2 = lpc2->next) {
104 PCMK__OUTPUT_ARGS(
"rsc-action-item",
"const char *",
"pcmk_resource_t *",
105 "pcmk_node_t *",
"pcmk_node_t *",
"pcmk_action_t *",
110 const char *change = va_arg(args,
const char *);
119 char *details = NULL;
120 bool same_host =
false;
121 bool same_role =
false;
122 bool need_role =
false;
124 static int rsc_width = 5;
125 static int detail_width = 5;
128 && ((destination != NULL) || (origin != NULL)));
130 if (source == NULL) {
134 len = strlen(rsc->
id);
135 if (len > rsc_width) {
144 if (pcmk__same_node(origin, destination)) {
152 if (need_role && (origin == NULL)) {
157 pcmk__node_name(destination));
159 }
else if (origin == NULL) {
163 }
else if (need_role && (destination == NULL)) {
167 pcmk__node_name(origin));
169 }
else if (destination == NULL) {
173 }
else if (need_role && same_role && same_host) {
177 pcmk__node_name(origin));
179 }
else if (same_role && same_host) {
183 }
else if (need_role && same_role) {
186 pcmk__node_name(destination),
189 }
else if (same_role) {
192 pcmk__node_name(destination));
194 }
else if (same_host) {
199 pcmk__node_name(origin));
205 pcmk__node_name(origin),
207 pcmk__node_name(destination));
210 len = strlen(details);
211 if (len > detail_width) {
215 if ((source->
reason != NULL)
219 }
else if (source->
reason) {
223 reason = strdup(
"blocked");
227 out->list_item(out, NULL,
"%-8s %-*s ( %*s )%s%s",
228 change, rsc_width, rsc->
id, detail_width, details,
229 ((reason == NULL)?
"" :
" "), pcmk__s(reason,
""));
236 PCMK__OUTPUT_ARGS(
"rsc-action-item",
"const char *",
"pcmk_resource_t *",
237 "pcmk_node_t *",
"pcmk_node_t *",
"pcmk_action_t *",
242 const char *change = va_arg(args,
const char *);
249 char *change_str = NULL;
251 bool same_host =
false;
252 bool same_role =
false;
253 bool need_role =
false;
257 && ((destination != NULL) || (origin != NULL)));
259 if (source == NULL) {
268 if (pcmk__same_node(origin, destination)) {
276 change_str = g_ascii_strdown(change, -1);
283 if (need_role && (origin == NULL)) {
293 }
else if (origin == NULL) {
297 }
else if (need_role && (destination == NULL)) {
305 }
else if (destination == NULL) {
309 }
else if (need_role && same_role && same_host) {
317 }
else if (same_role && same_host) {
321 }
else if (need_role && same_role) {
330 }
else if (same_role) {
337 }
else if (same_host) {
359 if ((source->
reason != NULL)
366 }
else if (source->
reason != NULL) {
377 PCMK__OUTPUT_ARGS(
"rsc-is-colocated-with-list",
"pcmk_resource_t *",
"bool")
381 bool recursive = va_arg(args,
int);
395 lpc != NULL; lpc = lpc->next) {
400 "Resources %s is colocated with", rsc->
id);
403 out->list_item(out, NULL,
"%s (id=%s - loop)",
408 hdr = colocations_header(cons->
primary, cons,
false);
409 out->list_item(out, NULL,
"%s", hdr);
413 out->begin_list(out, NULL, NULL, NULL);
415 out->message(out,
"locations-list", cons->
primary);
417 out->message(out,
"rsc-is-colocated-with-list",
428 PCMK__OUTPUT_ARGS(
"rsc-is-colocated-with-list",
"pcmk_resource_t *",
"bool")
430 rsc_is_colocated_with_list_xml(
pcmk__output_t *out, va_list args) {
432 bool recursive = va_arg(args,
int);
446 lpc != NULL; lpc = lpc->next) {
450 colocations_xml_node(out, cons->
primary, cons);
454 colocations_xml_node(out, cons->
primary, cons);
455 do_locations_list_xml(out, cons->
primary,
false);
458 out->message(out,
"rsc-is-colocated-with-list",
466 PCMK__OUTPUT_ARGS(
"rscs-colocated-with-list",
"pcmk_resource_t *",
"bool")
470 bool recursive = va_arg(args,
int);
484 lpc != NULL; lpc = lpc->next) {
492 out->list_item(out, NULL,
"%s (id=%s - loop)",
497 hdr = colocations_header(cons->
dependent, cons,
true);
498 out->list_item(out, NULL,
"%s", hdr);
502 out->begin_list(out, NULL, NULL, NULL);
504 out->message(out,
"locations-list", cons->
dependent);
506 out->message(out,
"rscs-colocated-with-list",
517 PCMK__OUTPUT_ARGS(
"rscs-colocated-with-list",
"pcmk_resource_t *",
"bool")
521 bool recursive = va_arg(args,
int);
535 lpc != NULL; lpc = lpc->next) {
539 colocations_xml_node(out, cons->
dependent, cons);
543 colocations_xml_node(out, cons->
dependent, cons);
544 do_locations_list_xml(out, cons->
dependent,
false);
547 out->message(out,
"rscs-colocated-with-list",
555 PCMK__OUTPUT_ARGS(
"locations-list",
"pcmk_resource_t *")
564 lpc != NULL; lpc = lpc->next) {
569 for (lpc2 = cons->
nodes; lpc2 != NULL; lpc2 = lpc2->next) {
573 out->list_item(out, NULL,
"Node %s (score=%s, id=%s, rsc=%s)",
574 pcmk__node_name(node),
584 PCMK__OUTPUT_ARGS(
"locations-list",
"pcmk_resource_t *")
588 return do_locations_list_xml(out, rsc,
true);
591 PCMK__OUTPUT_ARGS(
"locations-and-colocations",
"pcmk_resource_t *",
597 bool recursive = va_arg(args,
int);
598 bool force = va_arg(args,
int);
607 out->message(out,
"locations-list", rsc);
611 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
615 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
619 PCMK__OUTPUT_ARGS(
"locations-and-colocations",
"pcmk_resource_t *",
625 bool recursive = va_arg(args,
int);
626 bool force = va_arg(args,
int);
636 do_locations_list_xml(out, rsc,
false);
640 out->message(out,
"rscs-colocated-with-list", rsc, recursive);
644 out->message(out,
"rsc-is-colocated-with-list", rsc, recursive);
650 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
655 const char *sys_from G_GNUC_UNUSED = va_arg(args,
const char *);
656 const char *host_from = va_arg(args,
const char *);
657 const char *fsa_state = va_arg(args,
const char *);
658 const char *
result = va_arg(args,
const char *);
660 return out->info(out,
"Controller on %s in state %s: %s",
661 pcmk__s(host_from,
"unknown node"),
662 pcmk__s(fsa_state,
"unknown"),
663 pcmk__s(
result,
"unknown result"));
666 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
671 if (!out->is_quiet(out)) {
672 return health(out, args);
674 const char *sys_from G_GNUC_UNUSED = va_arg(args,
const char *);
675 const char *host_from G_GNUC_UNUSED = va_arg(args,
const char *);
676 const char *fsa_state = va_arg(args,
const char *);
677 const char *
result G_GNUC_UNUSED = va_arg(args,
const char *);
679 if (fsa_state != NULL) {
688 PCMK__OUTPUT_ARGS(
"health",
"const char *",
"const char *",
"const char *",
693 const char *sys_from = va_arg(args,
const char *);
694 const char *host_from = va_arg(args,
const char *);
695 const char *fsa_state = va_arg(args,
const char *);
696 const char *
result = va_arg(args,
const char *);
706 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
707 "enum pcmk_pacemakerd_state",
"const char *",
"time_t")
711 const char *sys_from = va_arg(args,
const char *);
714 const char *state_s = va_arg(args,
const char *);
715 time_t last_updated = va_arg(args, time_t);
717 char *last_updated_s = NULL;
720 if (sys_from == NULL) {
728 if (state_s == NULL) {
732 if (last_updated != 0) {
739 rc = out->info(out,
"Status of %s: '%s' (last updated %s)",
741 pcmk__s(last_updated_s,
"at unknown time"));
743 free(last_updated_s);
747 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
748 "enum pcmk_pacemakerd_state",
"const char *",
"time_t")
752 const char *sys_from = va_arg(args,
const char *);
755 const char *state_s = va_arg(args,
const char *);
756 time_t last_updated = va_arg(args, time_t);
758 char *last_updated_s = NULL;
761 if (sys_from == NULL) {
769 if (state_s == NULL) {
773 if (last_updated != 0) {
782 pcmk__s(last_updated_s,
"at unknown time"));
786 free(last_updated_s);
790 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
791 "enum pcmk_pacemakerd_state",
"const char *",
"time_t")
795 if (!out->is_quiet(out)) {
796 return pacemakerd_health(out, args);
798 const char *sys_from G_GNUC_UNUSED = va_arg(args,
const char *);
801 const char *state_s = va_arg(args,
const char *);
802 time_t last_updated G_GNUC_UNUSED = va_arg(args, time_t);
804 if (state_s == NULL) {
812 PCMK__OUTPUT_ARGS(
"pacemakerd-health",
"const char *",
813 "enum pcmk_pacemakerd_state",
"const char *",
"time_t")
817 const char *sys_from = va_arg(args,
const char *);
820 const char *state_s = va_arg(args,
const char *);
821 time_t last_updated = va_arg(args, time_t);
823 char *last_updated_s = NULL;
825 if (sys_from == NULL) {
833 if (state_s == NULL) {
837 if (last_updated != 0) {
849 free(last_updated_s);
853 PCMK__OUTPUT_ARGS(
"profile",
"const char *",
"clock_t",
"clock_t")
856 const char *xml_file = va_arg(args,
const char *);
857 clock_t start = va_arg(args, clock_t);
858 clock_t end = va_arg(args, clock_t);
860 out->list_item(out, NULL,
"Testing %s ... %.2f secs", xml_file,
861 (end - start) / (
float) CLOCKS_PER_SEC);
866 PCMK__OUTPUT_ARGS(
"profile",
"const char *",
"clock_t",
"clock_t")
869 const char *xml_file = va_arg(args,
const char *);
870 clock_t start = va_arg(args, clock_t);
871 clock_t end = va_arg(args, clock_t);
873 char *duration = pcmk__ftoa((end - start) / (
float) CLOCKS_PER_SEC);
884 PCMK__OUTPUT_ARGS(
"dc",
"const char *")
888 const char *dc = va_arg(args,
const char *);
890 return out->info(out,
"Designated Controller is: %s",
891 pcmk__s(dc,
"not yet elected"));
894 PCMK__OUTPUT_ARGS(
"dc",
"const char *")
898 if (!out->is_quiet(out)) {
899 return dc(out, args);
901 const char *dc = va_arg(args,
const char *);
912 PCMK__OUTPUT_ARGS(
"dc",
"const char *")
916 const char *dc = va_arg(args,
const char *);
924 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
925 "const char *",
"bool")
929 const char *
type = va_arg(args,
const char *);
930 const char *
name = va_arg(args,
const char *);
931 const char *
id = va_arg(args,
const char *);
932 bool bash_export = va_arg(args,
int);
935 return out->info(out,
"export %s=%s",
936 pcmk__s(
name,
"<null>"), pcmk__s(
id,
""));
938 return out->info(out,
"%s node: %s (%s)",
type ?
type :
"cluster",
939 pcmk__s(
name,
"<null>"), pcmk__s(
id,
"<null>"));
943 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
944 "const char *",
"bool")
948 if (!out->is_quiet(out)) {
949 return crmadmin_node(out, args);
951 const char *
type G_GNUC_UNUSED = va_arg(args,
const char *);
952 const char *
name = va_arg(args,
const char *);
953 const char *
id G_GNUC_UNUSED = va_arg(args,
const char *);
954 bool bash_export G_GNUC_UNUSED = va_arg(args,
int);
961 PCMK__OUTPUT_ARGS(
"crmadmin-node",
"const char *",
"const char *",
962 "const char *",
"bool")
966 const char *
type = va_arg(args,
const char *);
967 const char *
name = va_arg(args,
const char *);
968 const char *
id = va_arg(args,
const char *);
969 bool bash_export G_GNUC_UNUSED = va_arg(args,
int);
979 PCMK__OUTPUT_ARGS(
"digests",
"const pcmk_resource_t *",
"const pcmk_node_t *",
980 "const char *",
"guint",
"const pcmk__op_digest_t *")
986 const char *task = va_arg(args,
const char *);
987 guint interval_ms = va_arg(args, guint);
990 char *action_desc = NULL;
991 const char *rsc_desc =
"unknown resource";
992 const char *node_desc =
"unknown node";
994 if (interval_ms != 0) {
996 ((task == NULL)?
"unknown" : task));
998 action_desc = strdup(
"probe action");
1001 ((task == NULL)?
"unknown" : task));
1003 if ((rsc != NULL) && (rsc->
id != NULL)) {
1006 if ((node != NULL) && (node->
priv->
name != NULL)) {
1009 out->begin_list(out, NULL, NULL,
"Digests for %s %s on %s",
1010 rsc_desc, action_desc, node_desc);
1013 if (digests == NULL) {
1014 out->list_item(out, NULL,
"none");
1019 out->list_item(out, NULL,
"%s (all parameters)",
1023 out->list_item(out, NULL,
"%s (non-private parameters)",
1027 out->list_item(out, NULL,
"%s (non-reloadable parameters)",
1035 add_digest_xml(xmlNode *
parent,
const char *
type,
const char *digest,
1036 xmlNode *digest_source)
1038 if (digest != NULL) {
1047 PCMK__OUTPUT_ARGS(
"digests",
"const pcmk_resource_t *",
"const pcmk_node_t *",
1048 "const char *",
"guint",
"const pcmk__op_digest_t *")
1054 const char *task = va_arg(args,
const char *);
1055 guint interval_ms = va_arg(args, guint);
1059 xmlNode *xml = NULL;
1069 if (digests != NULL) {
1080 #define STOP_SANITY_ASSERT(lineno) do { \ 1081 if ((current != NULL) && current->details->unclean) { \ 1083 } else if (stop == NULL) { \ 1084 crm_err("%s:%d: No stop action exists for %s", \ 1085 __func__, lineno, rsc->id); \ 1086 pcmk__assert(stop != NULL); \ 1087 } else if (pcmk_is_set(stop->flags, pcmk__action_optional)) { \ 1088 crm_err("%s:%d: Action %s is still optional", \ 1089 __func__, lineno, stop->uuid); \ 1090 pcmk__assert(!pcmk_is_set(stop->flags, pcmk__action_optional)); \ 1094 PCMK__OUTPUT_ARGS(
"rsc-action",
"pcmk_resource_t *",
"pcmk_node_t *",
1103 GList *possible_matches = NULL;
1106 bool moving =
false;
1116 || (current == NULL && next == NULL)) {
1121 (managed?
"" :
" unmanaged"));
1125 moving = (current != NULL) && (next != NULL)
1126 && !pcmk__same_node(current, next);
1130 if (possible_matches) {
1131 start = possible_matches->data;
1132 g_list_free(possible_matches);
1139 start_node = current;
1143 if (possible_matches) {
1144 stop = possible_matches->data;
1145 g_list_free(possible_matches);
1153 if (possible_matches != NULL) {
1154 stop = possible_matches->data;
1155 g_list_free(possible_matches);
1161 if (possible_matches) {
1162 promote = possible_matches->data;
1163 g_list_free(possible_matches);
1168 if (possible_matches) {
1169 demote = possible_matches->data;
1170 g_list_free(possible_matches);
1181 if (possible_matches) {
1182 migrate_op = possible_matches->data;
1185 if ((migrate_op != NULL) && (current != NULL)
1187 rc = out->message(out,
"rsc-action-item",
"Migrate", rsc, current,
1191 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current,
1194 }
else if ((start == NULL)
1196 if ((demote != NULL) && (promote != NULL)
1199 rc = out->message(out,
"rsc-action-item",
"Re-promote", rsc,
1200 current, next, promote, demote);
1204 pcmk__node_name(next));
1208 if ((stop == NULL) || (stop->
reason == NULL)) {
1213 rc = out->message(out,
"rsc-action-item",
"Stop", rsc, current,
1214 NULL, stop, reason_op);
1217 }
else if (moving && current) {
1220 rc = out->message(out,
"rsc-action-item",
1221 (failed?
"Recover" :
"Move"), rsc, current, next,
1225 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
1230 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
1240 g_list_free(possible_matches);
1251 iter != NULL; iter = iter->next) {
1258 if (possible_matches) {
1259 stop_op = possible_matches->data;
1260 g_list_free(possible_matches);
1263 if (stop_op != NULL) {
1267 if (stop_op->
reason != NULL) {
1268 reason_op = stop_op;
1272 if (out->message(out,
"rsc-action-item",
"Stop", rsc, node, NULL,
1280 }
else if ((stop != NULL)
1281 && pcmk_all_flags_set(rsc->
flags,
1285 rc = out->message(out,
"rsc-action-item",
"Recover", rsc, current,
1289 }
else if (moving) {
1290 rc = out->message(out,
"rsc-action-item",
"Move", rsc, current, next,
1295 rc = out->message(out,
"rsc-action-item",
"Reload", rsc, current, next,
1298 }
else if ((stop != NULL)
1300 rc = out->message(out,
"rsc-action-item",
"Restart", rsc, current,
1306 rc = out->message(out,
"rsc-action-item",
"Demote", rsc, current,
1307 next, demote, NULL);
1311 rc = out->message(out,
"rsc-action-item",
"Promote", rsc, current,
1312 next, promote, NULL);
1316 rc = out->message(out,
"rsc-action-item",
"Start", rsc, current, next,
1323 PCMK__OUTPUT_ARGS(
"node-action",
"const char *",
"const char *",
"const char *")
1327 const char *task = va_arg(args,
const char *);
1328 const char *node_name = va_arg(args,
const char *);
1329 const char *reason = va_arg(args,
const char *);
1333 }
else if (reason) {
1334 out->list_item(out, NULL,
"%s %s '%s'", task, node_name, reason);
1342 PCMK__OUTPUT_ARGS(
"node-action",
"const char *",
"const char *",
"const char *")
1346 const char *task = va_arg(args,
const char *);
1347 const char *node_name = va_arg(args,
const char *);
1348 const char *reason = va_arg(args,
const char *);
1352 }
else if (reason) {
1365 PCMK__OUTPUT_ARGS(
"node-info",
"uint32_t",
"const char *",
"const char *",
1366 "const char *",
"bool",
"bool")
1370 uint32_t node_id = va_arg(args, uint32_t);
1371 const char *node_name = va_arg(args,
const char *);
1372 const char *uuid = va_arg(args,
const char *);
1373 const char *state = va_arg(args,
const char *);
1374 bool have_quorum = (bool) va_arg(args,
int);
1375 bool is_remote = (bool) va_arg(args,
int);
1377 return out->info(out,
1378 "Node %" PRIu32
": %s " 1379 "(uuid=%s, state=%s, have_quorum=%s, is_remote=%s)",
1380 node_id, pcmk__s(node_name,
"unknown"),
1381 pcmk__s(uuid,
"unknown"), pcmk__s(state,
"unknown"),
1382 pcmk__btoa(have_quorum), pcmk__btoa(is_remote));
1385 PCMK__OUTPUT_ARGS(
"node-info",
"uint32_t",
"const char *",
"const char *",
1386 "const char *",
"bool",
"bool")
1390 uint32_t node_id = va_arg(args, uint32_t);
1391 const char *node_name = va_arg(args,
const char *);
1392 const char *uuid = va_arg(args,
const char *);
1393 const char *state = va_arg(args,
const char *);
1394 bool have_quorum = (bool) va_arg(args,
int);
1395 bool is_remote = (bool) va_arg(args,
int);
1411 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
1416 const char *node = va_arg(args,
const char *);
1417 const char *task = va_arg(args,
const char *);
1418 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1420 if (out->is_quiet(out)) {
1425 out->list_item(out, NULL,
"Cluster action: %s for %s on %s",
1426 task, pcmk__xe_id(rsc), node);
1428 out->list_item(out, NULL,
"Cluster action: %s on %s", task, node);
1434 PCMK__OUTPUT_ARGS(
"inject-cluster-action",
"const char *",
"const char *",
1439 const char *node = va_arg(args,
const char *);
1440 const char *task = va_arg(args,
const char *);
1441 xmlNodePtr rsc = va_arg(args, xmlNodePtr);
1443 xmlNodePtr xml_node = NULL;
1445 if (out->is_quiet(out)) {
1461 PCMK__OUTPUT_ARGS(
"inject-fencing-action",
"const char *",
"const char *")
1465 const char *
target = va_arg(args,
const char *);
1466 const char *op = va_arg(args,
const char *);
1468 if (out->is_quiet(out)) {
1472 out->list_item(out, NULL,
"Fencing %s (%s)",
target, op);
1476 PCMK__OUTPUT_ARGS(
"inject-fencing-action",
"const char *",
"const char *")
1480 const char *
target = va_arg(args,
const char *);
1481 const char *op = va_arg(args,
const char *);
1483 if (out->is_quiet(out)) {
1494 PCMK__OUTPUT_ARGS(
"inject-attr",
"const char *",
"const char *",
"xmlNode *")
1498 const char *
name = va_arg(args,
const char *);
1499 const char *value = va_arg(args,
const char *);
1500 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1502 xmlChar *node_path = NULL;
1504 if (out->is_quiet(out)) {
1508 node_path = xmlGetNodePath(cib_node);
1510 out->list_item(out, NULL,
"Injecting attribute %s=%s into %s '%s'",
1511 name, value, node_path, pcmk__xe_id(cib_node));
1517 PCMK__OUTPUT_ARGS(
"inject-attr",
"const char *",
"const char *",
"xmlNode *")
1521 const char *
name = va_arg(args,
const char *);
1522 const char *value = va_arg(args,
const char *);
1523 xmlNodePtr cib_node = va_arg(args, xmlNodePtr);
1525 xmlChar *node_path = NULL;
1527 if (out->is_quiet(out)) {
1531 node_path = xmlGetNodePath(cib_node);
1543 PCMK__OUTPUT_ARGS(
"inject-spec",
"const char *")
1547 const char *spec = va_arg(args,
const char *);
1549 if (out->is_quiet(out)) {
1553 out->list_item(out, NULL,
"Injecting %s into the configuration", spec);
1557 PCMK__OUTPUT_ARGS(
"inject-spec",
"const char *")
1561 const char *spec = va_arg(args,
const char *);
1563 if (out->is_quiet(out)) {
1573 PCMK__OUTPUT_ARGS(
"inject-modify-config",
"const char *",
"const char *")
1577 const char *quorum = va_arg(args,
const char *);
1578 const char *watchdog = va_arg(args,
const char *);
1580 if (out->is_quiet(out)) {
1584 out->begin_list(out, NULL, NULL,
"Performing Requested Modifications");
1587 out->list_item(out, NULL,
"Setting quorum: %s", quorum);
1591 out->list_item(out, NULL,
"Setting watchdog: %s", watchdog);
1597 PCMK__OUTPUT_ARGS(
"inject-modify-config",
"const char *",
"const char *")
1601 const char *quorum = va_arg(args,
const char *);
1602 const char *watchdog = va_arg(args,
const char *);
1604 xmlNodePtr node = NULL;
1606 if (out->is_quiet(out)) {
1624 PCMK__OUTPUT_ARGS(
"inject-modify-node",
"const char *",
"const char *")
1628 const char *
action = va_arg(args,
const char *);
1629 const char *node = va_arg(args,
const char *);
1631 if (out->is_quiet(out)) {
1636 out->list_item(out, NULL,
"Bringing node %s online", node);
1639 out->list_item(out, NULL,
"Taking node %s offline", node);
1642 out->list_item(out, NULL,
"Failing node %s", node);
1649 PCMK__OUTPUT_ARGS(
"inject-modify-node",
"const char *",
"const char *")
1653 const char *
action = va_arg(args,
const char *);
1654 const char *node = va_arg(args,
const char *);
1656 if (out->is_quiet(out)) {
1667 PCMK__OUTPUT_ARGS(
"inject-modify-ticket",
"const char *",
"const char *")
1671 const char *
action = va_arg(args,
const char *);
1672 const char *ticket = va_arg(args,
const char *);
1674 if (out->is_quiet(out)) {
1679 out->list_item(out, NULL,
"Making ticket %s standby", ticket);
1681 out->list_item(out, NULL,
"%s ticket %s",
action, ticket);
1687 PCMK__OUTPUT_ARGS(
"inject-modify-ticket",
"const char *",
"const char *")
1691 const char *
action = va_arg(args,
const char *);
1692 const char *ticket = va_arg(args,
const char *);
1694 if (out->is_quiet(out)) {
1705 PCMK__OUTPUT_ARGS(
"inject-pseudo-action",
"const char *",
"const char *")
1709 const char *node = va_arg(args,
const char *);
1710 const char *task = va_arg(args,
const char *);
1712 if (out->is_quiet(out)) {
1716 out->list_item(out, NULL,
"Pseudo action: %s%s%s",
1717 task, ((node == NULL)?
"" :
" on "), pcmk__s(node,
""));
1721 PCMK__OUTPUT_ARGS(
"inject-pseudo-action",
"const char *",
"const char *")
1725 const char *node = va_arg(args,
const char *);
1726 const char *task = va_arg(args,
const char *);
1728 xmlNodePtr xml_node = NULL;
1730 if (out->is_quiet(out)) {
1744 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
1745 "const char *",
"guint")
1749 const char *rsc = va_arg(args,
const char *);
1750 const char *operation = va_arg(args,
const char *);
1751 const char *node = va_arg(args,
const char *);
1752 guint interval_ms = va_arg(args, guint);
1754 if (out->is_quiet(out)) {
1759 out->list_item(out, NULL,
"Resource action: %-15s %s=%u on %s",
1760 rsc, operation, interval_ms, node);
1762 out->list_item(out, NULL,
"Resource action: %-15s %s on %s",
1763 rsc, operation, node);
1769 PCMK__OUTPUT_ARGS(
"inject-rsc-action",
"const char *",
"const char *",
1770 "const char *",
"guint")
1774 const char *rsc = va_arg(args,
const char *);
1775 const char *operation = va_arg(args,
const char *);
1776 const char *node = va_arg(args,
const char *);
1777 guint interval_ms = va_arg(args, guint);
1779 xmlNodePtr xml_node = NULL;
1781 if (out->is_quiet(out)) {
1792 char *interval_s = pcmk__itoa(interval_ms);
1801 #define CHECK_RC(retcode, retval) \ 1802 if (retval == pcmk_rc_ok) { \ 1803 retcode = pcmk_rc_ok; \ 1806 PCMK__OUTPUT_ARGS(
"cluster-status",
"pcmk_scheduler_t *",
1807 "enum pcmk_pacemakerd_state",
"crm_exit_t",
1808 "stonith_history_t *",
"enum pcmk__fence_history",
"uint32_t",
1809 "uint32_t",
"const char *",
"GList *",
"GList *")
1819 uint32_t section_opts = va_arg(args, uint32_t);
1820 uint32_t show_opts = va_arg(args, uint32_t);
1821 const char *prefix = va_arg(args,
const char *);
1822 GList *unames = va_arg(args, GList *);
1823 GList *resources = va_arg(args, GList *);
1826 bool already_printed_failure =
false;
1829 section_opts, show_opts));
1852 if (pcmk_any_flags_set(section_opts,
1855 resources, section_opts, show_opts,
1871 if (history_rc == 0) {
1878 CHECK_RC(rc, out->message(out,
"failed-fencing-list",
1879 stonith_history, unames, section_opts,
1884 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1885 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1889 already_printed_failure =
true;
1895 CHECK_RC(rc, out->message(out,
"ticket-list",
1909 if (history_rc != 0) {
1910 if (!already_printed_failure) {
1912 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
1913 out->list_item(out, NULL,
"Failed to get fencing history: %s",
1924 CHECK_RC(rc, out->message(out,
"fencing-list", hp, unames,
1925 section_opts, show_opts,
1935 CHECK_RC(rc, out->message(out,
"pending-fencing-list", hp,
1936 unames, section_opts, show_opts,
1945 PCMK__OUTPUT_ARGS(
"cluster-status",
"pcmk_scheduler_t *",
1946 "enum pcmk_pacemakerd_state",
"crm_exit_t",
1947 "stonith_history_t *",
"enum pcmk__fence_history",
"uint32_t",
1948 "uint32_t",
"const char *",
"GList *",
"GList *")
1958 uint32_t section_opts = va_arg(args, uint32_t);
1959 uint32_t show_opts = va_arg(args, uint32_t);
1960 const char *prefix = va_arg(args,
const char *);
1961 GList *unames = va_arg(args, GList *);
1962 GList *resources = va_arg(args, GList *);
1964 out->message(out,
"cluster-summary",
scheduler, pcmkd_state, section_opts,
1969 out->message(out,
"node-list",
scheduler->
nodes, unames, resources,
1978 out->message(out,
"resource-list",
scheduler, full_show_opts,
1979 false, unames, resources,
false);
1984 out->message(out,
"node-attribute-list",
scheduler, show_opts,
false,
1991 if (pcmk_any_flags_set(section_opts,
1993 out->message(out,
"node-summary",
scheduler, unames,
1994 resources, section_opts, show_opts,
false);
2002 out->message(out,
"failed-action-list",
scheduler, unames, resources,
2009 out->message(out,
"full-fencing-list", history_rc, stonith_history,
2010 unames, section_opts, show_opts,
false);
2016 false,
false,
false);
2021 out->message(out,
"ban-list",
scheduler, prefix, resources, show_opts,
2028 PCMK__OUTPUT_ARGS(
"cluster-status",
"pcmk_scheduler_t *",
2029 "enum pcmk_pacemakerd_state",
"crm_exit_t",
2030 "stonith_history_t *",
"enum pcmk__fence_history",
"uint32_t",
2031 "uint32_t",
"const char *",
"GList *",
"GList *")
2041 uint32_t section_opts = va_arg(args, uint32_t);
2042 uint32_t show_opts = va_arg(args, uint32_t);
2043 const char *prefix = va_arg(args,
const char *);
2044 GList *unames = va_arg(args, GList *);
2045 GList *resources = va_arg(args, GList *);
2046 bool already_printed_failure =
false;
2048 out->message(out,
"cluster-summary",
scheduler, pcmkd_state, section_opts,
2053 out->message(out,
"node-list",
scheduler->
nodes, unames, resources,
2059 out->message(out,
"resource-list",
scheduler, show_opts,
true, unames,
2065 out->message(out,
"node-attribute-list",
scheduler, show_opts,
false,
2072 if (pcmk_any_flags_set(section_opts,
2074 out->message(out,
"node-summary",
scheduler, unames,
2075 resources, section_opts, show_opts,
false);
2083 out->message(out,
"failed-action-list",
scheduler, unames, resources,
2090 if (history_rc == 0) {
2097 out->message(out,
"failed-fencing-list", stonith_history,
2098 unames, section_opts, show_opts,
false);
2101 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
2102 out->list_item(out, NULL,
"Failed to get fencing history: %s",
2111 if (history_rc != 0) {
2112 if (!already_printed_failure) {
2113 out->begin_list(out, NULL, NULL,
"Failed Fencing Actions");
2114 out->list_item(out, NULL,
"Failed to get fencing history: %s",
2125 out->message(out,
"fencing-list", hp, unames, section_opts,
2135 out->message(out,
"pending-fencing-list", hp, unames,
2136 section_opts, show_opts,
false);
2144 false,
false,
false);
2149 out->message(out,
"ban-list",
scheduler, prefix, resources, show_opts,
2156 #define KV_PAIR(k, v) do { \ 2158 pcmk__g_strcat(s, k "=", pcmk__s(v, ""), " ", NULL); \ 2160 pcmk__g_strcat(s, k "=\"", pcmk__s(v, ""), "\" ", NULL); \ 2164 PCMK__OUTPUT_ARGS(
"attribute",
"const char *",
"const char *",
"const char *",
2165 "const char *",
"const char *",
"bool",
"bool")
2169 const char *scope = va_arg(args,
const char *);
2170 const char *instance = va_arg(args,
const char *);
2171 const char *
name = va_arg(args,
const char *);
2172 const char *value = va_arg(args,
const char *);
2173 const char *
host = va_arg(args,
const char *);
2174 bool quiet = va_arg(args,
int);
2175 bool legacy = va_arg(args,
int);
2177 gchar *value_esc = NULL;
2181 if (value != NULL) {
2183 bool was_quiet = out->is_quiet(out);
2189 out->info(out,
"%s", value);
2191 out->quiet = was_quiet;
2197 s = g_string_sized_new(50);
2204 if (!pcmk__str_empty(scope)) {
2208 if (!pcmk__str_empty(instance)) {
2214 if (!pcmk__str_empty(
host)) {
2224 out->info(out,
"%s", s->str);
2227 g_string_free(s, TRUE);
2231 PCMK__OUTPUT_ARGS(
"attribute",
"const char *",
"const char *",
"const char *",
2232 "const char *",
"const char *",
"bool",
"bool")
2236 const char *scope = va_arg(args,
const char *);
2237 const char *instance = va_arg(args,
const char *);
2238 const char *
name = va_arg(args,
const char *);
2239 const char *value = va_arg(args,
const char *);
2240 const char *
host = va_arg(args,
const char *);
2241 bool quiet G_GNUC_UNUSED = va_arg(args,
int);
2242 bool legacy G_GNUC_UNUSED = va_arg(args,
int);
2244 xmlNodePtr node = NULL;
2251 if (!pcmk__str_empty(scope)) {
2255 if (!pcmk__str_empty(instance)) {
2259 if (!pcmk__str_empty(
host)) {
2266 PCMK__OUTPUT_ARGS(
"rule-check",
"const char *",
"int",
"const char *")
2270 const char *rule_id = va_arg(args,
const char *);
2271 int result = va_arg(args,
int);
2272 const char *error = va_arg(args,
const char *);
2276 return out->info(out,
"Rule %s is still in effect", rule_id);
2278 return out->info(out,
"Rule %s satisfies conditions", rule_id);
2280 return out->info(out,
"Rule %s is expired", rule_id);
2282 return out->info(out,
"Rule %s has not yet taken effect", rule_id);
2284 return out->info(out,
"Rule %s does not satisfy conditions",
2288 "Could not determine whether rule %s is in effect: %s",
2289 rule_id, ((error != NULL)? error :
"unexpected error"));
2294 PCMK__OUTPUT_ARGS(
"rule-check",
"const char *",
"int",
"const char *")
2298 const char *rule_id = va_arg(args,
const char *);
2299 int result = va_arg(args,
int);
2300 const char *error = va_arg(args,
const char *);
2319 "Could not determine whether rule %s is in effect: %s",
2320 rule_id, ((error != NULL)? error :
"unexpected error"));
2325 PCMK__OUTPUT_ARGS(
"result-code",
"int",
"const char *",
"const char *")
2332 PCMK__OUTPUT_ARGS(
"result-code",
"int",
"const char *",
"const char *")
2336 int code = va_arg(args,
int);
2337 const char *
name = va_arg(args,
const char *);
2338 const char *desc = va_arg(args,
const char *);
2340 static int code_width = 0;
2342 if (out->is_quiet(out)) {
2347 if ((
name != NULL) && (desc != NULL)) {
2350 }
else if ((
name != NULL) || (desc != NULL)) {
2360 if (code_width == 0) {
2362 code_width = (int) snprintf(NULL, 0,
"%lld", most_negative);
2365 if ((
name != NULL) && (desc != NULL)) {
2366 static int name_width = 0;
2368 if (name_width == 0) {
2372 name_width = QB_MAX(name_width, len);
2375 return out->info(out,
"% *d: %-*s %s", code_width, code, name_width,
2379 if ((
name != NULL) || (desc != NULL)) {
2380 return out->info(out,
"% *d: %s", code_width, code,
2384 return out->info(out,
"% *d", code_width, code);
2387 PCMK__OUTPUT_ARGS(
"result-code",
"int",
"const char *",
"const char *")
2391 int code = va_arg(args,
int);
2392 const char *
name = va_arg(args,
const char *);
2393 const char *desc = va_arg(args,
const char *);
2395 char *code_str = pcmk__itoa(code);
2406 PCMK__OUTPUT_ARGS(
"ticket-attribute",
"const char *",
"const char *",
"const char *")
2410 const char *ticket_id G_GNUC_UNUSED = va_arg(args,
const char *);
2411 const char *
name G_GNUC_UNUSED = va_arg(args,
const char *);
2412 const char *value = va_arg(args,
const char *);
2414 out->info(out,
"%s", value);
2418 PCMK__OUTPUT_ARGS(
"ticket-attribute",
"const char *",
"const char *",
"const char *")
2422 const char *ticket_id = va_arg(args,
const char *);
2423 const char *
name = va_arg(args,
const char *);
2424 const char *value = va_arg(args,
const char *);
2446 PCMK__OUTPUT_ARGS(
"ticket-constraints",
"xmlNode *")
2450 xmlNode *constraint_xml = va_arg(args, xmlNode *);
2470 out->info(out,
"Constraints XML:\n");
2476 GString *buf = g_string_sized_new(1024);
2480 g_string_free(buf, TRUE);
2483 }
while (child != NULL);
2485 GString *buf = g_string_sized_new(1024);
2489 g_string_free(buf, TRUE);
2496 add_ticket_element_with_constraints(xmlNode *node,
void *userdata)
2514 add_resource_element(xmlNode *node,
void *userdata)
2524 PCMK__OUTPUT_ARGS(
"ticket-constraints",
"xmlNode *")
2528 xmlNode *constraint_xml = va_arg(args, xmlNode *);
2571 add_ticket_element_with_constraints(constraint_xml, out);
2575 add_resource_element(constraint_xml, out);
2582 PCMK__OUTPUT_ARGS(
"ticket-state",
"xmlNode *")
2586 xmlNode *state_xml = va_arg(args, xmlNode *);
2588 GString *buf = g_string_sized_new(1024);
2590 out->info(out,
"State XML:\n");
2594 g_string_free(buf, TRUE);
2599 add_ticket_element(xmlNode *node,
void *userdata)
2602 xmlNode *ticket_node = NULL;
2609 PCMK__OUTPUT_ARGS(
"ticket-state",
"xmlNode *")
2613 xmlNode *state_xml = va_arg(args, xmlNode *);
2623 if (state_xml->children != NULL) {
2630 add_ticket_element(state_xml, out);
2638 {
"attribute",
"default", attribute_default },
2639 {
"attribute",
"xml", attribute_xml },
2641 {
"cluster-status",
"html", cluster_status_html },
2642 {
"cluster-status",
"xml", cluster_status_xml },
2643 {
"crmadmin-node",
"default", crmadmin_node },
2644 {
"crmadmin-node",
"text", crmadmin_node_text },
2645 {
"crmadmin-node",
"xml", crmadmin_node_xml },
2646 {
"dc",
"default", dc },
2647 {
"dc",
"text", dc_text },
2648 {
"dc",
"xml", dc_xml },
2649 {
"digests",
"default", digests_text },
2650 {
"digests",
"xml", digests_xml },
2651 {
"health",
"default", health },
2652 {
"health",
"text", health_text },
2653 {
"health",
"xml", health_xml },
2654 {
"inject-attr",
"default", inject_attr },
2655 {
"inject-attr",
"xml", inject_attr_xml },
2656 {
"inject-cluster-action",
"default", inject_cluster_action },
2657 {
"inject-cluster-action",
"xml", inject_cluster_action_xml },
2658 {
"inject-fencing-action",
"default", inject_fencing_action },
2659 {
"inject-fencing-action",
"xml", inject_fencing_action_xml },
2660 {
"inject-modify-config",
"default", inject_modify_config },
2661 {
"inject-modify-config",
"xml", inject_modify_config_xml },
2662 {
"inject-modify-node",
"default", inject_modify_node },
2663 {
"inject-modify-node",
"xml", inject_modify_node_xml },
2664 {
"inject-modify-ticket",
"default", inject_modify_ticket },
2665 {
"inject-modify-ticket",
"xml", inject_modify_ticket_xml },
2666 {
"inject-pseudo-action",
"default", inject_pseudo_action },
2667 {
"inject-pseudo-action",
"xml", inject_pseudo_action_xml },
2668 {
"inject-rsc-action",
"default", inject_rsc_action },
2669 {
"inject-rsc-action",
"xml", inject_rsc_action_xml },
2670 {
"inject-spec",
"default", inject_spec },
2671 {
"inject-spec",
"xml", inject_spec_xml },
2672 {
"locations-and-colocations",
"default", locations_and_colocations },
2673 {
"locations-and-colocations",
"xml", locations_and_colocations_xml },
2674 {
"locations-list",
"default", locations_list },
2675 {
"locations-list",
"xml", locations_list_xml },
2676 {
"node-action",
"default", node_action },
2677 {
"node-action",
"xml", node_action_xml },
2678 {
"node-info",
"default", node_info_default },
2679 {
"node-info",
"xml", node_info_xml },
2680 {
"pacemakerd-health",
"default", pacemakerd_health },
2681 {
"pacemakerd-health",
"html", pacemakerd_health_html },
2682 {
"pacemakerd-health",
"text", pacemakerd_health_text },
2683 {
"pacemakerd-health",
"xml", pacemakerd_health_xml },
2684 {
"profile",
"default", profile_default, },
2685 {
"profile",
"xml", profile_xml },
2687 {
"result-code",
"text", result_code_text },
2688 {
"result-code",
"xml", result_code_xml },
2689 {
"rsc-action",
"default", rsc_action_default },
2690 {
"rsc-action-item",
"default", rsc_action_item },
2691 {
"rsc-action-item",
"xml", rsc_action_item_xml },
2692 {
"rsc-is-colocated-with-list",
"default", rsc_is_colocated_with_list },
2693 {
"rsc-is-colocated-with-list",
"xml", rsc_is_colocated_with_list_xml },
2694 {
"rscs-colocated-with-list",
"default", rscs_colocated_with_list },
2695 {
"rscs-colocated-with-list",
"xml", rscs_colocated_with_list_xml },
2696 {
"rule-check",
"default", rule_check_default },
2697 {
"rule-check",
"xml", rule_check_xml },
2698 {
"ticket-attribute",
"default", ticket_attribute_default },
2699 {
"ticket-attribute",
"xml", ticket_attribute_xml },
2700 {
"ticket-constraints",
"default", ticket_constraints_default },
2701 {
"ticket-constraints",
"xml", ticket_constraints_xml },
2702 {
"ticket-state",
"default", ticket_state_default },
2703 {
"ticket-state",
"xml", ticket_state_xml },
2705 { NULL, NULL, NULL }
#define CRM_CHECK(expr, failure_action)
#define PCMK_XE_PACEMAKERD
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
#define crm_notice(fmt, args...)
#define PCMK_XA_NEXT_ROLE
char * pcmk__xml_escape(const char *text, enum pcmk__xml_escape_type type)
const char * pcmk_role_text(enum rsc_role_e role)
Get readable description of a resource role.
stonith_history_t * stonith__first_matching_event(stonith_history_t *history, bool(*matching_fn)(stonith_history_t *, void *), void *user_data)
#define PCMK__XE_TICKET_STATE
Control output from tools.
void pcmk__register_messages(pcmk__output_t *out, const pcmk__message_entry_t *table)
#define PCMK_XA_REMOTE_NODE
#define PCMK__SERVER_REMOTED
void pcmk__xe_set_bool_attr(xmlNodePtr node, const char *name, bool value)
#define crm_time_log_timeofday
pcmk_resource_t * uber_parent(pcmk_resource_t *rsc)
enum pcmk_ipc_server type
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
pcmk__fence_history
Control how much of the fencing history is output.
void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer, int depth)
#define PCMK_XE_CONSTRAINTS
bool pcmk__xml_needs_escape(const char *text, enum pcmk__xml_escape_type type)
#define PCMK_XE_RSC_COLOCATION
#define pcmk__rsc_info(rsc, fmt, args...)
#define PCMK_XA_WITH_RSC_ROLE
#define pcmk__set_rsc_flags(resource, flags_to_set)
#define PCMK_ACTION_MONITOR
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
#define PCMK_XA_HAVE_QUORUM
#define PCMK__XE_XPATH_QUERY
xmlNodePtr pcmk__output_xml_create_parent(pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED
pcmk__scheduler_private_t * priv
#define PCMK_XE_PSEUDO_ACTION
#define CHECK_RC(retcode, retval)
int pcmk__xe_foreach_child(xmlNode *xml, const char *child_element_name, int(*handler)(xmlNode *xml, void *userdata), void *userdata)
GHashTable * ticket_constraints
#define PCMK_XE_RESULT_CODE
enum crm_exit_e crm_exit_t
#define CRM_LOG_ASSERT(expr)
#define PCMK_XE_NODE_ACTION
GList * pe__resource_actions(const pcmk_resource_t *rsc, const pcmk_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
xmlNodePtr pcmk__output_create_html_node(pcmk__output_t *out, const char *element_name, const char *id, const char *class_name, const char *text)
void pcmk__register_lib_messages(pcmk__output_t *out)
#define PCMK_XA_NODE_PATH
#define PCMK_XE_ATTRIBUTE
Include indentation and newlines.
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
bool stonith__event_state_pending(stonith_history_t *history, void *user_data)
void void void pcmk__formatted_printf(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
#define PCMK__OUTPUT_SPACER_IF(out_obj, cond)
#define PCMK_XE_RULE_CHECK
pcmk__node_private_t * priv
void pe__clear_resource_flags_on_all(pcmk_scheduler_t *scheduler, uint64_t flag)
#define PCMK_ACTION_DEMOTE
const char * crm_exit_str(crm_exit_t exit_code)
#define PCMK_XA_LAST_UPDATED
#define PCMK_XE_RSC_ACTION
#define PCMK_XE_RSC_LOCATION
pcmk_scheduler_t * scheduler
#define PCMK_XA_NODE_NAME
#define PCMK_XE_INJECT_ATTR
void pcmk__unpack_constraints(pcmk_scheduler_t *scheduler)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define PCMK_XA_DESCRIPTION
void pcmk__g_strcat(GString *buffer,...) G_GNUC_NULL_TERMINATED
GList * with_this_colocations
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
#define PCMK_ACTION_START
pcmk__resource_private_t * priv
Wrappers for and extensions to libxml2.
enum rsc_role_e next_role
xmlNodePtr pcmk__output_create_xml_node(pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED
#define PCMK_XE_CONSTRAINT
#define PCMK_XE_INJECT_SPEC
#define pcmk_section_fencing_all
int pcmk__cluster_status_text(pcmk__output_t *out, va_list args)
char * digest_restart_calc
GList * location_constraints
#define PCMK_XE_NODE_INFO
#define crm_time_log_with_timezone
void pcmk__output_xml_pop_parent(pcmk__output_t *out)
Function and executable result codes.
xmlNode * pcmk__xe_next(const xmlNode *node, const char *element_name)
pcmk_resource_t * primary
#define pcmk__assert(expr)
#define PCMK__OUTPUT_LIST_FOOTER(out_obj, retcode)
void pcmk__xe_set_props(xmlNodePtr node,...) G_GNUC_NULL_TERMINATED
#define PCMK_XA_NODE_ATTRIBUTE
#define PCMK__OUTPUT_LIST_HEADER(out_obj, cond, retcode, title...)
int pcmk__xe_copy_attrs(xmlNode *target, const xmlNode *src, uint32_t flags)
pcmk__action_result_t result
const char * pcmk_rc_name(int rc)
Get a return code constant name as a string.
pcmk_scheduler_t * scheduler
const char * pcmk_pacemakerd_api_daemon_state_enum2text(enum pcmk_pacemakerd_state state)
#define STOP_SANITY_ASSERT(lineno)
GList * find_actions(GList *input, const char *key, const pcmk_node_t *on_node)
char * pcmk__epoch2str(const time_t *source, uint32_t flags)
enum rsc_role_e orig_role
#define PCMK_ACTION_MIGRATE_FROM
This structure contains everything that makes up a single output formatter.
GList * this_with_colocations
#define PCMK_XA_ATTRIBUTE
#define PCMK_ACTION_PROMOTE
pcmk_resource_t * dependent
const char * pcmk__pcmkd_state_enum2friendly(enum pcmk_pacemakerd_state state)
#define PCMK_XE_FENCING_ACTION
#define PCMK_XE_MODIFICATIONS
const char * node_attribute
#define PCMK_XE_MODIFY_TICKET
char * digest_secure_calc
Resource role is unknown.
Location constraint object.
#define PCMK_XE_CLUSTER_ACTION
#define PCMK_XE_MODIFY_NODE
bool stonith__event_state_eq(stonith_history_t *history, void *user_data)
#define PCMK_XE_RESOURCES
#define crm_time_log_date
bool stonith__event_state_neq(stonith_history_t *history, void *user_data)
void pcmk__output_xml_add_node_copy(pcmk__output_t *out, xmlNodePtr node)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
struct pcmk__node_assignment * assign