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

Function mon_refresh_display

tools/crm_mon.c:2185–2234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2183}
2184
2185gboolean
2186mon_refresh_display(gpointer user_data)
2187{
2188 xmlNode *cib_copy = copy_xml(current_cib);
2189 pe_working_set_t data_set;
2190
2191 last_refresh = time(NULL);
2192
2193 if (cli_config_update(&cib_copy, NULL, FALSE) == FALSE) {
2194 if (cib) {
2195 cib->cmds->signoff(cib);
2196 }
2197 print_as("Upgrade failed: %s", pcmk_strerror(-pcmk_err_dtd_validation));
2198 if (as_console) {
2199 sleep(2);
2200 }
2201 clean_up(EX_USAGE);
2202 return FALSE;
2203 }
2204
2205 set_working_set_defaults(&data_set);
2206 data_set.input = cib_copy;
2207 cluster_status(&data_set);
2208
2209 if (as_html_file || web_cgi) {
2210 if (print_html_status(&data_set, as_html_file, web_cgi) != 0) {
2211 fprintf(stderr, "Critical: Unable to output html file\n");
2212 clean_up(EX_USAGE);
2213 }
2214 } else if (as_xml) {
2215 if (print_xml_status(&data_set) != 0) {
2216 fprintf(stderr, "Critical: Unable to output xml file\n");
2217 clean_up(EX_USAGE);
2218 }
2219 } else if (daemonize) {
2220 /* do nothing */
2221
2222 } else if (simple_status) {
2223 print_simple_status(&data_set);
2224 if (has_warnings) {
2225 clean_up(EX_USAGE);
2226 }
2227
2228 } else {
2229 print_status(&data_set);
2230 }
2231
2232 cleanup_calculations(&data_set);
2233 return TRUE;
2234}
2235
2236void mon_st_callback(stonith_t *st, stonith_event_t *e)
2237{

Callers 3

cib_connectFunction · 0.85
mainFunction · 0.85
crm_diff_updateFunction · 0.85

Calls 11

copy_xmlFunction · 0.85
cli_config_updateFunction · 0.85
pcmk_strerrorFunction · 0.85
clean_upFunction · 0.85
set_working_set_defaultsFunction · 0.85
cluster_statusFunction · 0.85
print_html_statusFunction · 0.85
print_xml_statusFunction · 0.85
print_simple_statusFunction · 0.85
print_statusFunction · 0.85
cleanup_calculationsFunction · 0.85

Tested by

no test coverage detected