70 cib_t *cib, xmlNode *current_cib,
73 uint32_t show, uint32_t show_opts,
74 const char *only_node,
const char *only_rsc,
75 const char *neg_location_prefix)
81 GList *resources = NULL;
125 out->
message(out,
"cluster-status",
127 stonith_history, fence_history, show, show_opts,
128 neg_location_prefix, unames, resources);
130 g_list_free_full(unames, free);
131 g_list_free_full(resources, free);
134 stonith_history = NULL;
166 show_opts, NULL, NULL, NULL, 0);
208 uint32_t show_opts,
const char *only_node,
const char *only_rsc,
209 const char *neg_location_prefix,
unsigned int timeout_ms)
211 xmlNode *current_cib = NULL;
215 time_t last_updated = 0;
229 last_updated = time(NULL);
231 switch (pcmkd_state) {
241 out->
message(out,
"pacemakerd-health",
242 NULL, pcmkd_state, NULL, last_updated);
247 stonith = fencing_connect();
255 out->
message(out,
"pacemakerd-health",
256 NULL, pcmkd_state, NULL, last_updated);
271 pcmkd_state, fence_history, show,
272 show_opts, only_node, only_rsc,
273 neg_location_prefix);
275 out->
err(out,
"Error outputting status info from the fencer or CIB");
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
Control output from tools.
void stonith__register_messages(pcmk__output_t *out)
cib_t * cib_new(void)
Create a new CIB connection object.
int cib__signon_query(pcmk__output_t *out, cib_t **cib, xmlNode **cib_object)
int(* message)(pcmk__output_t *out, const char *message_id,...)
pcmk__fence_history
Control how much of the fencing history is output.
void pe_reset_working_set(pcmk_scheduler_t *scheduler)
Reset scheduler data to default state without freeing it.
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
int pcmk__output_cluster_status(pcmk_scheduler_t *scheduler, stonith_t *stonith, cib_t *cib, xmlNode *current_cib, enum pcmk_pacemakerd_state pcmkd_state, enum pcmk__fence_history fence_history, uint32_t show, uint32_t show_opts, const char *only_node, const char *only_rsc, const char *neg_location_prefix)
int pcmk__update_configured_schema(xmlNode **xml, bool to_logs)
Update XML from its configured schema to the latest major series.
pcmk__scheduler_private_t * priv
int pcmk__pacemakerd_status(pcmk__output_t *out, const char *ipc_name, unsigned int message_timeout_ms, bool show_output, enum pcmk_pacemakerd_state *state)
void pcmk__xml_output_finish(pcmk__output_t *out, crm_exit_t exit_status, xmlNodePtr *xml)
GList * pe__build_rsc_list(pcmk_scheduler_t *scheduler, const char *s)
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
gboolean cluster_status(pcmk_scheduler_t *scheduler)
void cib_delete(cib_t *cib)
Free all memory used by CIB connection.
stonith_t * stonith_api_new(void)
void pcmk__xml_free(xmlNode *xml)
void pcmk__unpack_constraints(pcmk_scheduler_t *scheduler)
int pcmk__xml_output_new(pcmk__output_t **out, xmlNodePtr *xml)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int(*) int(*) void(* err)(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
void pcmk__register_lib_messages(pcmk__output_t *out)
GList * pe__build_node_name_list(pcmk_scheduler_t *scheduler, const char *s)
void pe__register_messages(pcmk__output_t *out)
int(* connect)(stonith_t *st, const char *name, int *stonith_fd)
Connect to the local fencer.
int pcmk__status(pcmk__output_t *out, cib_t *cib, enum pcmk__fence_history fence_history, uint32_t show, uint32_t show_opts, const char *only_node, const char *only_rsc, const char *neg_location_prefix, unsigned int timeout_ms)
int cib__clean_up_connection(cib_t **cib)
pcmk_scheduler_t * pe_new_working_set(void)
Create a new object to hold scheduler data.
Function and executable result codes.
void pe_free_working_set(pcmk_scheduler_t *scheduler)
Free scheduler data.
void stonith_api_delete(stonith_t *st)
pcmk_scheduler_t * scheduler
stonith_api_operations_t * cmds
void stonith_history_free(stonith_history_t *history)
#define pcmk__mem_assert(ptr)
This structure contains everything that makes up a single output formatter.
int pcmk__get_fencing_history(stonith_t *st, stonith_history_t **stonith_history, enum pcmk__fence_history fence_history)
Fetch fencing history, optionally reducing it.
int pcmk_status(xmlNodePtr *xml)
Output cluster status formatted like crm_mon --output-as=xml