Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2218218

Summary: Cluster does not move resource group when colocation constraint exists for individual group member
Product: Red Hat Enterprise Linux 9 Reporter: Patrik Hagara <phagara>
Component: pacemakerAssignee: Ken Gaillot <kgaillot>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 9.3CC: cluster-maint, msmazova
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pacemaker-2.1.6-4.el9 Doc Type: Bug Fix
Doc Text:
Cause: When assigning groups to a node, Pacemaker did not consider constraints that were configured explicitly with a group member instead of the group itself. Consequence: A group could be assigned to a node where some of its members were unable to run. Fix: Pacemaker now considers member colocations when assigning groups. Result: Groups run on the best available node.
Story Points: ---
Clone Of:
: 2218232 (view as bug list) Environment:
Last Closed: 2023-11-07 08:23:06 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.7
Embargoed:
Bug Depends On:    
Bug Blocks: 2218232    

Comment 4 Markéta Smazová 2023-07-25 14:28:43 UTC
after fix:
----------

>   [root@virt-511 ~]# rpm -q pacemaker
>   pacemaker-2.1.6-5.el9.x86_64

Create two collocated and ordered resources:
>   [root@virt-511 ~]# pcs resource create blue1 ocf:pacemaker:Dummy
>   [root@virt-511 ~]# pcs resource create blue2 ocf:pacemaker:Dummy
>   [root@virt-511 ~]# pcs constraint order start blue1 then blue2
>   Adding blue1 blue2 (kind: Mandatory) (Options: first-action=start then-action=start)
>   [root@virt-511 ~]# pcs constraint colocation add blue2 with blue1 score=INFINITY

Create group with two resources:
>   [root@virt-511 ~]# pcs resource create green1 ocf:pacemaker:Dummy --group green-group
>   [root@virt-511 ~]# pcs resource create green2 ocf:pacemaker:Dummy --group green-group

The collocated and ordered resources "blue1" and "blue2" run on node "virt-511" and the group "green-group"
runs on node "virt-513":
>   [root@virt-511 ~]# pcs status
>   Cluster name: STSRHTS2474
>   Cluster Summary:
>     * Stack: corosync (Pacemaker is running)
>     * Current DC: virt-511 (version 2.1.6-5.el9-6fdc9deea29) - partition with quorum
>     * Last updated: Tue Jul 25 14:16:40 2023 on virt-511
>     * Last change:  Tue Jul 25 14:16:15 2023 by root via cibadmin on virt-511
>     * 2 nodes configured
>     * 6 resource instances configured

>   Node List:
>     * Online: [ virt-511 virt-513 ]

>   Full List of Resources:
>     * fence-virt-511	(stonith:fence_xvm):	 Started virt-511
>     * fence-virt-513	(stonith:fence_xvm):	 Started virt-513
>     * blue1	(ocf:pacemaker:Dummy):	 Started virt-511
>     * blue2	(ocf:pacemaker:Dummy):	 Started virt-511
>     * Resource Group: green-group:
>       * green1	(ocf:pacemaker:Dummy):	 Started virt-513
>       * green2	(ocf:pacemaker:Dummy):	 Started virt-513

>   Daemon Status:
>     corosync: active/enabled
>     pacemaker: active/enabled
>     pcsd: active/enabled

>   [root@virt-511 ~]# pcs constraint --full
>   Colocation Constraints:
>     resource 'blue2' with resource 'blue1' (id: colocation-blue2-blue1-INFINITY)
>       score=INFINITY
>   Order Constraints:
>     start resource 'blue1' then start resource 'blue2' (id: order-blue1-blue2-mandatory)

Add resource "blue2" to the "green-group":
>   [root@virt-511 ~]# pcs resource group add green-group blue2
>   [root@virt-511 ~]# pcs status
>   Cluster name: STSRHTS2474
>   Cluster Summary:
>     * Stack: corosync (Pacemaker is running)
>     * Current DC: virt-511 (version 2.1.6-5.el9-6fdc9deea29) - partition with quorum
>     * Last updated: Tue Jul 25 14:17:11 2023 on virt-511
>     * Last change:  Tue Jul 25 14:17:01 2023 by root via cibadmin on virt-511
>     * 2 nodes configured
>     * 6 resource instances configured

>   Node List:
>     * Online: [ virt-511 virt-513 ]

>   Full List of Resources:
>     * fence-virt-511	(stonith:fence_xvm):	 Started virt-511
>     * fence-virt-513	(stonith:fence_xvm):	 Started virt-513
>     * blue1	(ocf:pacemaker:Dummy):	 Started virt-511
>     * Resource Group: green-group:
>       * green1	(ocf:pacemaker:Dummy):	 Started virt-511
>       * green2	(ocf:pacemaker:Dummy):	 Started virt-511
>       * blue2	(ocf:pacemaker:Dummy):	 Started virt-511

>   Daemon Status:
>     corosync: active/enabled
>     pacemaker: active/enabled
>     pcsd: active/enabled

RESULT: Resource group "green-group" moved to the node "virt-511" where the resources "blue1" and "blue2" originally started.

marking VERIFIED in pacemaker-2.1.6-5.el9

Comment 7 errata-xmlrpc 2023-11-07 08:23:06 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/RHEA-2023:6314