19 #include <sys/types.h> 29 const char *first = cib_source;
31 if (cib_source == NULL) {
32 crm_info(
"Reading XML from: live cluster");
36 while (isspace(*first)) {
54 xmlNode *status = NULL;
55 xmlNode *cib_object_copy = NULL;
61 out->
err(out,
"This tool can only check complete configurations (i.e. those starting with <cib>).");
71 (xmlRelaxNGValidityErrorFunc) out->
err, out)) {
80 out->
err(out,
"The cluster will NOT be able to use this configuration.\n" 81 "Please manually update the configuration to conform to the %s syntax.",
91 if (*cib_object != NULL) {
125 xmlNode *cib_object = NULL;
137 out->
err(out,
"Couldn't parse input");
144 out->
err(out,
"Couldn't allocate scheduler data: %s",
pcmk_rc_str(rc));
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
Control output from tools.
int cib__signon_query(pcmk__output_t *out, cib_t **cib, xmlNode **cib_object)
int pcmk__verify(pcmk_scheduler_t *scheduler, pcmk__output_t *out, xmlNode **cib_object)
int pcmk_verify(xmlNodePtr *xml, const char *cib_source)
Verify that a CIB is error-free or output errors and warnings.
#define pcmk__config_err(fmt...)
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
int pcmk__update_configured_schema(xmlNode **xml, bool to_logs)
Update XML from its configured schema to the latest major series.
void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags, pcmk_scheduler_t *scheduler)
void pcmk__xml_output_finish(pcmk__output_t *out, crm_exit_t exit_status, xmlNodePtr *xml)
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
gboolean crm_config_error
xmlNode * pcmk_find_cib_element(xmlNode *cib, const char *element_name)
Find an element in the CIB.
int pcmk__xml_output_new(pcmk__output_t **out, xmlNodePtr *xml)
bool pcmk__validate_xml(xmlNode *xml_blob, const char *validation, xmlRelaxNGValidityErrorFunc error_handler, void *error_handler_context)
int(*) int(*) void(* err)(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
void pcmk__register_lib_messages(pcmk__output_t *out)
void pe__register_messages(pcmk__output_t *out)
void free_xml(xmlNode *child)
pcmk_scheduler_t * pe_new_working_set(void)
Create a new object to hold scheduler data.
Function and executable result codes.
xmlNode * pcmk__xml_parse(const char *input)
xmlNode * pcmk__xml_read(const char *filename)
#define pcmk__assert(expr)
void pe_free_working_set(pcmk_scheduler_t *scheduler)
Free scheduler data.
pcmk_scheduler_t * scheduler
gboolean crm_config_warning
This structure contains everything that makes up a single output formatter.
const char * pcmk__highest_schema_name(void)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
int pcmk__parse_cib(pcmk__output_t *out, const char *cib_source, xmlNodePtr *cib_object)
#define crm_info(fmt, args...)