Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
pacemaker.8750
pacemaker-libpe_status-recover-after-failed-dem...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libpe_status-recover-after-failed-demote-when-appropriate.patch of Package pacemaker.8750
commit a962eb7f2aca3f764a1ddecf3c415c2c75a86b01 Author: Ken Gaillot <kgaillot@redhat.com> Date: Fri Dec 15 14:41:02 2017 -0600 Low: libpe_status: recover after failed demote when appropriate Previously, the PE would always do a full stop after any failed demote. However, if the resource needed recovery, the necessary start wouln't be scheduled until the next transition. Now, we skip the forced stop. It wasn't needed because native_create_actions() does the right thing already. If the resource's next role is stopped, it will schedule the right actions to get to stopped. If the resource's next role is something else, it will force a stop and start for master/slave resources when both a current node and a chosen node have been set (indicating recovery). diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 71307790e..ac1784d88 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -2662,11 +2662,6 @@ unpack_rsc_op_failure(resource_t * rsc, node_t * node, int rc, xmlNode * xml_op, rsc->role = RSC_ROLE_MASTER; } else if (safe_str_eq(task, CRMD_ACTION_DEMOTE)) { - /* - * staying in role=master ends up putting the PE/TE into a loop - * setting role=slave is not dangerous because no master will be - * promoted until the failed resource has been fully stopped - */ if (action->on_fail == action_fail_block) { rsc->role = RSC_ROLE_MASTER; rsc->next_role = RSC_ROLE_STOPPED; @@ -2675,9 +2670,13 @@ unpack_rsc_op_failure(resource_t * rsc, node_t * node, int rc, xmlNode * xml_op, rsc->role = RSC_ROLE_STOPPED; } else { - crm_warn("Forcing %s to stop after a failed demote action", rsc->id); + /* + * Staying in master role would put the PE/TE into a loop. Setting + * slave role is not dangerous because the resource will be stopped + * as part of recovery, and any master promotion will be ordered + * after that stop. + */ rsc->role = RSC_ROLE_SLAVE; - rsc->next_role = RSC_ROLE_STOPPED; } } else if (compare_version("2.0", op_version) > 0 && safe_str_eq(task, CRMD_ACTION_START)) {
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