Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
pacemaker.8750
pacemaker-libpe_status-validate-no-quorum-polic...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libpe_status-validate-no-quorum-policy=suicide.patch of Package pacemaker.8750
commit 64fdcf44dbb28f87e8b225bb44a16dc15ccae952 Author: Ken Gaillot <kgaillot@redhat.com> Date: Wed Sep 27 15:45:14 2017 -0500 Fix: libpe_status: validate no-quorum-policy=suicide correctly The previous implementation had cases where a no-quorum-policy of suicide would get ignored, leaving data_set->no_quorum_policy unset, which would be 0 (no_quorum_freeze). The main example is when stonith-enabled=false and the cluster has, or has ever had, quorum. The new implementation always uses no_quorum_stop if suicide needs to be overridden. diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index a13153e42..d450f0e8e 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -218,20 +218,19 @@ unpack_config(xmlNode * config, pe_working_set_t * data_set) data_set->no_quorum_policy = no_quorum_freeze; } else if (safe_str_eq(value, "suicide")) { - gboolean do_panic = FALSE; + if (is_set(data_set->flags, pe_flag_stonith_enabled)) { + int do_panic = 0; - crm_element_value_int(data_set->input, XML_ATTR_QUORUM_PANIC, &do_panic); - - if (is_set(data_set->flags, pe_flag_stonith_enabled) == FALSE) { - crm_config_err - ("Setting no-quorum-policy=suicide makes no sense if stonith-enabled=false"); - } - - if (do_panic && is_set(data_set->flags, pe_flag_stonith_enabled)) { - data_set->no_quorum_policy = no_quorum_suicide; - - } else if (is_set(data_set->flags, pe_flag_have_quorum) == FALSE && do_panic == FALSE) { - crm_notice("Resetting no-quorum-policy to 'stop': The cluster has never had quorum"); + crm_element_value_int(data_set->input, XML_ATTR_QUORUM_PANIC, + &do_panic); + if (do_panic || is_set(data_set->flags, pe_flag_have_quorum)) { + data_set->no_quorum_policy = no_quorum_suicide; + } else { + crm_notice("Resetting no-quorum-policy to 'stop': cluster has never had quorum"); + data_set->no_quorum_policy = no_quorum_stop; + } + } else { + crm_config_err("Resetting no-quorum-policy to 'stop': stonith is not configured"); data_set->no_quorum_policy = no_quorum_stop; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor