From 65f0812b61f161cfaa2e8f3972d5ebb3b5e5af8b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 06 2018 18:39:28 +0000 Subject: import pacemaker-1.1.16-12.el7_4.8 --- diff --git a/SOURCES/113-bundles.patch b/SOURCES/113-bundles.patch new file mode 100644 index 0000000..28ea0ef --- /dev/null +++ b/SOURCES/113-bundles.patch @@ -0,0 +1,92 @@ +From 2ce5fc46463ff7b9a5a2c68602d8c5b35a7c37d7 Mon Sep 17 00:00:00 2001 +From: Andrew Beekhof +Date: Tue, 16 Jan 2018 19:05:31 +1100 +Subject: [PATCH 1/2] Bug rhbz#1519812 - Prevent notify actions from causing + --wait to hang + +--- + tools/crm_resource_runtime.c | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c +index 22bdebf..189d1b3 100644 +--- a/tools/crm_resource_runtime.c ++++ b/tools/crm_resource_runtime.c +@@ -1343,10 +1343,19 @@ done: + return rc; + } + +-#define action_is_pending(action) \ +- ((is_set((action)->flags, pe_action_optional) == FALSE) \ +- && (is_set((action)->flags, pe_action_runnable) == TRUE) \ +- && (is_set((action)->flags, pe_action_pseudo) == FALSE)) ++static inline int action_is_pending(action_t *action) ++{ ++ if(is_set(action->flags, pe_action_optional)) { ++ return FALSE; ++ } else if(is_set(action->flags, pe_action_runnable) == FALSE) { ++ return FALSE; ++ } else if(is_set(action->flags, pe_action_pseudo)) { ++ return FALSE; ++ } else if(safe_str_eq("notify", action->task)) { ++ return FALSE; ++ } ++ return TRUE; ++} + + /*! + * \internal +@@ -1362,7 +1371,9 @@ actions_are_pending(GListPtr actions) + GListPtr action; + + for (action = actions; action != NULL; action = action->next) { +- if (action_is_pending((action_t *) action->data)) { ++ action_t *a = (action_t *)action->data; ++ if (action_is_pending(a)) { ++ crm_notice("Waiting for %s (flags=0x%.8x)", a->uuid, a->flags); + return TRUE; + } + } +-- +1.8.3.1 + + +From ef15ea4f687e7f9ba1f8a99548ee1e0bf9d4b50a Mon Sep 17 00:00:00 2001 +From: Andrew Beekhof +Date: Mon, 22 Jan 2018 21:18:46 +1100 +Subject: [PATCH 2/2] Fix: rhbz#1527072 - Correctly observe colocation + constraints with bundles in the Master role + +--- + pengine/container.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/pengine/container.c b/pengine/container.c +index f5d916c..15d094d 100644 +--- a/pengine/container.c ++++ b/pengine/container.c +@@ -486,10 +486,18 @@ container_rsc_colocation_rh(resource_t * rsc_lh, resource_t * rsc, rsc_colocatio + } else { + node_t *chosen = tuple->docker->fns->location(tuple->docker, NULL, FALSE); + +- if (chosen != NULL && is_set_recursive(tuple->docker, pe_rsc_block, TRUE) == FALSE) { +- pe_rsc_trace(rsc, "Allowing %s: %s %d", constraint->id, chosen->details->uname, chosen->weight); +- allocated_rhs = g_list_prepend(allocated_rhs, chosen); ++ if (chosen == NULL || is_set_recursive(tuple->docker, pe_rsc_block, TRUE)) { ++ continue; ++ } ++ if(constraint->role_rh >= RSC_ROLE_MASTER && tuple->child == NULL) { ++ continue; + } ++ if(constraint->role_rh >= RSC_ROLE_MASTER && tuple->child->next_role < RSC_ROLE_MASTER) { ++ continue; ++ } ++ ++ pe_rsc_trace(rsc, "Allowing %s: %s %d", constraint->id, chosen->details->uname, chosen->weight); ++ allocated_rhs = g_list_prepend(allocated_rhs, chosen); + } + } + +-- +1.8.3.1 + diff --git a/SPECS/pacemaker.spec b/SPECS/pacemaker.spec index 5584b4e..c7c86be 100644 --- a/SPECS/pacemaker.spec +++ b/SPECS/pacemaker.spec @@ -143,7 +143,7 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager Version: %{pcmkversion} -Release: %{pcmk_release}%{?dist}.7 +Release: %{pcmk_release}%{?dist}.8 %if %{defined _unitdir} License: GPLv2+ and LGPLv2+ %else @@ -270,6 +270,7 @@ Patch109: 109-bundles.patch Patch110: 110-bundles.patch Patch111: 111-use-of-null.patch Patch112: 112-use-of-null.patch +Patch113: 113-bundles.patch # patches that aren't from upstream Patch200: lrmd-protocol-version.patch @@ -940,6 +941,12 @@ exit 0 %attr(0644,root,root) %{_datadir}/pacemaker/nagios/plugins-metadata/* %changelog +* Wed Jan 24 2018 Ken Gaillot - 1.1.16-12.8 +- Fix pcs resource --wait timeout when bundles are used +- Observe colocation constraints correctly with bundles in master role +- Resolves: rhbz#1520798 +- Resolves: rhbz#1537557 + * Tue Jan 2 2018 Ken Gaillot - 1.1.16-12.7 - Fix use-of-NULL memory issues - Resolves: rhbz#1527810