Bug 2125337

Summary: Pacemaker does not abort transition if resource configuration is moved
Product: Red Hat Enterprise Linux 9 Reporter: Ken Gaillot <kgaillot>
Component: pacemakerAssignee: Reid Wahl <nwahl>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact: Steven J. Levine <slevine>
Priority: urgent    
Version: 9.1CC: cfeist, cluster-maint, cluster-qe, jrehova, kgaillot, mjuricek, msmazova, nwahl, slevine, toneata
Target Milestone: rcKeywords: Regression, Triaged, ZStream
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: pacemaker-2.1.5-1.el9 Doc Type: Bug Fix
Doc Text:
.Pacemaker now rechecks resource assignments immediately when resource order changes As of RHEL 8.7, Pacemaker did not recheck resource assignments when the order of resources in the CIB changed with no changes to the resource definition. If configuration reordering would cause resources to move, that would not take place until the next natural transition, up to the value of `cluster-recheck-interval-property`. This could cause issues if resource stickiness is not configured for a resource. With this change, Pacemaker rechecks resource assignments when the order of the resources in the CIB changes, as it did for earlier Pacemaker releases. The cluster now responds immediately to these changes, if needed.
Story Points: ---
Clone Of: 2122806
: 2128035 (view as bug list) Environment:
Last Closed: 2023-05-09 07:18:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 2.1.5
Embargoed:
Bug Depends On: 2122806    
Bug Blocks: 2128035    

Description Ken Gaillot 2022-09-08 16:36:11 UTC
+++ This bug was initially created as a clone of Bug #2122806 +++

Description of problem: Since upstream version 2.1.3 (RHEL 8.7 and 9.1), Pacemaker ignores CIB changes that only reorder resource configuration without changing them. However the order of resources in the configuration affects their order of placement, and thus a configuration move can require resources to change nodes. In that case, the moves will not be done until the next natural transition (up to the value of cluster-recheck-interval).


Version-Release number of selected component (if applicable): pacemaker-2.1.4-5


How reproducible: reliably


Steps to Reproduce:
1. Configure a cluster with no stickiness, two nodes (called node1 and node2 here), and three resources (called rsc1, rsc2, and rsc3 here, created in that order). It's expected that rsc1 and rsc3 will run on node1 and rsc2 will run on node2.
2. Run "pcs cluster edit" and move the configuration of rsc3 before rsc1.

Actual results: The cluster does not move any resources (and crm_resource --wait hangs) until the next natural transition.


Expected results: rsc1 is immediately moved to node2 after changing their order in the CIB.

Comment 3 Reid Wahl 2022-09-15 18:27:26 UTC
Fixed by upstream commit 04d1ba5f

Comment 10 jrehova 2022-11-28 17:41:35 UTC
* 2 nodes cluster

Version of pacemaker:

> [root@virt-553 ~]# rpm -q pacemaker
> pacemaker-2.1.5-2.el9.x86_64

Cluster with no stickiness:

> [root@virt-553 ~]# pcs resource defaults resource-stickiness=0
> [root@virt-553 ~]# pcs resource defaults
> Meta Attrs: build-resource-defaults
>   resource-stickiness=0

Created resources:

> [root@virt-553 ~]# pcs resource create rsc1 ocf:heartbeat:Dummy
> [root@virt-553 ~]# pcs resource create rsc2 ocf:heartbeat:Dummy
> [root@virt-553 ~]# pcs resource create rsc3 ocf:heartbeat:Dummy

> [root@virt-553 ~]# pcs resource
>   * rsc1	(ocf:heartbeat:Dummy):	 Started virt-553
>   * rsc2	(ocf:heartbeat:Dummy):	 Started virt-559
>   * rsc3	(ocf:heartbeat:Dummy):	 Started virt-553

Run 'pcs cluster edit' and moved the configuration of rsc3 before rsc1:

> [root@virt-553 ~]# pcs cluster edit
> CIB updated
 
> [root@virt-553 ~]# pcs resource
>   * rsc3	(ocf:heartbeat:Dummy):	 Started virt-553
>   * rsc1	(ocf:heartbeat:Dummy):	 Started virt-559
>   * rsc2	(ocf:heartbeat:Dummy):	 Started virt-559
 
> [root@virt-553 ~]# time crm_resource --wait hangs
> crm_resource: non-option ARGV-elements:
> [1 of 1] hangs
> 
> 
> real	0m0.009s
> user	0m0.004s
> sys	0m0.005s

Comment 11 jrehova 2022-11-28 17:56:53 UTC
Fix above-mentioned command:

> [root@virt-553 ~]# time crm_resource --wait

> real	0m2.017s
> user	0m0.008s
> sys	0m0.005s

Comment 12 jrehova 2022-11-28 17:57:18 UTC
Fix above-mentioned command:

> [root@virt-553 ~]# time crm_resource --wait

> real	0m2.017s
> user	0m0.008s
> sys	0m0.005s

Comment 15 errata-xmlrpc 2023-05-09 07:18:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pacemaker bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2150