MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / print_node

Function print_node

lib/pengine/utils.c:870–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868}
869
870void
871print_node(const char *pre_text, node_t * node, gboolean details)
872{
873 if (node == NULL) {
874 crm_trace("%s%s: <NULL>", pre_text == NULL ? "" : pre_text, pre_text == NULL ? "" : ": ");
875 return;
876 }
877
878 crm_trace("%s%s%sNode %s: (weight=%d, fixed=%s)",
879 pre_text == NULL ? "" : pre_text,
880 pre_text == NULL ? "" : ": ",
881 node->details ==
882 NULL ? "error " : node->details->online ? "" : "Unavailable/Unclean ",
883 node->details->uname, node->weight, node->fixed ? "True" : "False");
884
885 if (details && node != NULL && node->details != NULL) {
886 char *pe_mutable = strdup("\t\t");
887 GListPtr gIter = node->details->running_rsc;
888
889 crm_trace("\t\t===Node Attributes");
890 g_hash_table_foreach(node->details->attrs, print_str_str, pe_mutable);
891 free(pe_mutable);
892
893 crm_trace("\t\t=== Resources");
894
895 for (; gIter != NULL; gIter = gIter->next) {
896 resource_t *rsc = (resource_t *) gIter->data;
897
898 print_resource(LOG_DEBUG_4, "\t\t", rsc, FALSE);
899 }
900 }
901}
902
903/*
904 * Used by the HashTable for-loop

Callers 2

pe_free_nodesFunction · 0.85
native_printFunction · 0.85

Calls 1

print_resourceFunction · 0.85

Tested by

no test coverage detected