| 781 | } |
| 782 | |
| 783 | static void |
| 784 | config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data) |
| 785 | { |
| 786 | const char *value = NULL; |
| 787 | GHashTable *config_hash = NULL; |
| 788 | crm_time_t *now = crm_time_new(NULL); |
| 789 | |
| 790 | if (rc != pcmk_ok) { |
| 791 | fsa_data_t *msg_data = NULL; |
| 792 | |
| 793 | crm_err("Local CIB query resulted in an error: %s", pcmk_strerror(rc)); |
| 794 | register_fsa_error(C_FSA_INTERNAL, I_ERROR, NULL); |
| 795 | |
| 796 | if (rc == -EACCES || rc == -pcmk_err_dtd_validation) { |
| 797 | crm_err("The cluster is mis-configured - shutting down and staying down"); |
| 798 | set_bit(fsa_input_register, R_STAYDOWN); |
| 799 | } |
| 800 | goto bail; |
| 801 | } |
| 802 | |
| 803 | crm_debug("Call %d : Parsing CIB options", call_id); |
| 804 | config_hash = |
| 805 | g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); |
| 806 | |
| 807 | unpack_instance_attributes(output, output, XML_CIB_TAG_PROPSET, NULL, config_hash, |
| 808 | CIB_OPTIONS_FIRST, FALSE, now); |
| 809 | |
| 810 | verify_crmd_options(config_hash); |
| 811 | |
| 812 | value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME); |
| 813 | election_trigger->period_ms = crm_get_msec(value); |
| 814 | |
| 815 | value = crmd_pref(config_hash, XML_CONFIG_ATTR_FORCE_QUIT); |
| 816 | shutdown_escalation_timer->period_ms = crm_get_msec(value); |
| 817 | crm_debug("Shutdown escalation occurs after: %dms", shutdown_escalation_timer->period_ms); |
| 818 | |
| 819 | value = crmd_pref(config_hash, XML_CONFIG_ATTR_ELECTION_FAIL); |
| 820 | election_timeout->period_ms = crm_get_msec(value); |
| 821 | |
| 822 | value = crmd_pref(config_hash, XML_CONFIG_ATTR_RECHECK); |
| 823 | recheck_timer->period_ms = crm_get_msec(value); |
| 824 | crm_debug("Checking for expired actions every %dms", recheck_timer->period_ms); |
| 825 | |
| 826 | value = crmd_pref(config_hash, "crmd-transition-delay"); |
| 827 | transition_timer->period_ms = crm_get_msec(value); |
| 828 | |
| 829 | value = crmd_pref(config_hash, "crmd-integration-timeout"); |
| 830 | integration_timer->period_ms = crm_get_msec(value); |
| 831 | |
| 832 | value = crmd_pref(config_hash, "crmd-finalization-timeout"); |
| 833 | finalization_timer->period_ms = crm_get_msec(value); |
| 834 | |
| 835 | #if SUPPORT_COROSYNC |
| 836 | if (is_classic_ais_cluster()) { |
| 837 | value = crmd_pref(config_hash, XML_ATTR_EXPECTED_VOTES); |
| 838 | crm_debug("Sending expected-votes=%s to corosync", value); |
| 839 | send_ais_text(crm_class_quorum, value, TRUE, NULL, crm_msg_ais); |
| 840 | } |
nothing calls this directly
no test coverage detected