File bsc#1206263-0002-Fix-scheduler-prevent-a-leftover-pending-monitor-fro.patch of Package pacemaker.29737

From 1d28036392d94001714d6ade8b4e00c0554a409d Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Fri, 2 Dec 2022 18:56:17 +0100
Subject: [PATCH 2/6] Fix: scheduler: prevent a leftover pending monitor from
 causing unexpected stop of other instances

As far as I can tell, the test `leftover-pending-monitor` exposes an
issue when deciding whether to add a `pe_order_runnable_left` flag for
the ordering related to a probe, where it's supposed to check whether
there's any parent resource with `running_on` rather than the instance
itself.

According to 7d37dc58d upon unpacking, with the leftover pending monitor
of stateful-1 on node-1, stateful-1:0 is exclusively assigned to node-1
and determined being stopped there. With the previous logic, given that
stateful-1:0 has no `running_on`, despite the fact that another instance
is already running on node-3, `pe_order_runnable_left` flag is enforced
for the ordering between `stateful-1:0_monitor_0` and
`promotable-1_start_0`. But then stateful-1:0_monitor_0 is marked
unrunnable because node-2 is pending, and then so is
promotable-1_start_0...
---
 lib/pacemaker/pcmk_sched_probes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pacemaker/pcmk_sched_probes.c b/lib/pacemaker/pcmk_sched_probes.c
index 197c7ff3c..08b077c9d 100644
--- a/lib/pacemaker/pcmk_sched_probes.c
+++ b/lib/pacemaker/pcmk_sched_probes.c
@@ -261,7 +261,7 @@ pcmk__probe_rsc_on_node(pe_resource_t *rsc, pe_node_t *node)
     }
 
     if (!pcmk_is_set(probe->flags, pe_action_runnable)
-        && (rsc->running_on == NULL)) {
+        && (top->running_on == NULL)) {
         /* Prevent the parent from starting if the resource can't, but don't
          * cause the parent to stop if already active.
          */
-- 
2.35.3

openSUSE Build Service is sponsored by