Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
pacemaker.21298
bsc#1177212-0003-Low-libpe_status-add-sanity-ch...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1177212-0003-Low-libpe_status-add-sanity-check-when-unpacking-mig.patch of Package pacemaker.21298
From 7fb64dd23b2f46edb67bca2b9f7b35221749aa97 Mon Sep 17 00:00:00 2001 From: Ken Gaillot <kgaillot@redhat.com> Date: Fri, 5 Jul 2019 10:28:39 -0500 Subject: [PATCH 3/8] Low: libpe_status: add sanity check when unpacking migration history e89ac6d (1.1.4) bumped the feature set when it changed the recording and processing of migrate_to and migrate_from action history. That would ensure live clusters wouldn't have any problems with the changes. However it didn't take any precautions for processing old saved CIB files. These would either work by coincidence or fail. We don't support such old files in Pacemaker 2, so just add a sanity check to ensure we have the right information. --- lib/pengine/unpack.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index ab619c836..4dba8ab00 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -2445,6 +2445,9 @@ unpack_migrate_to_success(pe_resource_t *rsc, pe_node_t *node, xmlNode *xml_op, const char *source = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_SOURCE); const char *target = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_TARGET); + // Sanity check + CRM_CHECK(source && target && !strcmp(source, node->details->uname), return); + if (stop_happened_after(rsc, node, xml_op, data_set)) { return; } @@ -2518,6 +2521,9 @@ unpack_migrate_to_failure(pe_resource_t *rsc, pe_node_t *node, xmlNode *xml_op, const char *source = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_SOURCE); const char *target = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_TARGET); + // Sanity check + CRM_CHECK(source && target && !strcmp(source, node->details->uname), return); + /* If a migration failed, we have to assume the resource is active. Clones * are not allowed to migrate, so role can't be master. */ @@ -2572,6 +2578,9 @@ unpack_migrate_from_failure(pe_resource_t *rsc, pe_node_t *node, const char *source = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_SOURCE); const char *target = crm_element_value(xml_op, XML_LRM_ATTR_MIGRATE_TARGET); + // Sanity check + CRM_CHECK(source && target && !strcmp(target, node->details->uname), return); + /* If a migration failed, we have to assume the resource is active. Clones * are not allowed to migrate, so role can't be master. */ -- 2.26.2
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