Bug 2461143 - pcs constraint in default text mode orders resources alphabetically
Summary: pcs constraint in default text mode orders resources alphabetically
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcs
Version: 43
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Pospisil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-04-23 15:19 UTC by Luca Cavana
Modified: 2026-06-10 01:08 UTC (History)
8 users (show)

Fixed In Version: pcs-0.12.2-2.fc44 pcs-0.12.2-2.fc43
Clone Of:
Environment:
Last Closed: 2026-06-10 00:55:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Luca Cavana 2026-04-23 15:19:41 UTC
When issuing the "pcs constraints" command and you have one or multiple resource sets configured, the resources in the resource set are ordered alphabetically if the default "text" output format is used.
They are supposed to match the order in the CIB, as the cluster takes actions based on the order in which resources are in the CIB, the other output formats do respect the order of the resources in the CIB.
This creates confusion.

For example:
$ sudo pcs constraint --full
Colocation Set Constraints:
  Set Constraint: colocation_set-nfs_server
    score=INFINITY
    Resource Set: colocation_set-nfs_server_set
      Resources: 'nfs_data_drbd-clone'
      role=Promoted
    Resource Set: colocation_set-nfs_server_set-1
      Resources: 'nfs_data_animaletti', 'nfs_data_infodir', 'nfs_data_multimedia', 'nfs_data_software', 'nfs_export_animaletti', 'nfs_export_multimedia', 'nfs_export_root', 'nfs_export_software',
          'nfs_ipv4', 'nfs_ipv6', 'nfs_server'
Order Set Constraints:
  Set Constraint: order_set-nfs_server
    Resource Set: order_set-nfs_server_set
      Resources: 'nfs_data_drbd-clone'
      action=promote
    Resource Set: order_set-nfs_server_set-1
      Resources: 'nfs_data_animaletti', 'nfs_data_infodir', 'nfs_data_multimedia', 'nfs_data_software', 'nfs_export_animaletti', 'nfs_export_multimedia', 'nfs_export_root', 'nfs_export_software',
          'nfs_ipv4', 'nfs_ipv6', 'nfs_server'
      action=start

$ sudo pcs constraint --output-format=json
{
  "location": [],
  "location_set": [],
  "colocation": [],
  "colocation_set": [
    {
      "resource_sets": [
        {
          "set_id": "colocation_set-nfs_server_set",
          "sequential": null,
          "require_all": null,
          "ordering": null,
          "action": null,
          "role": "Promoted",
          "score": null,
          "kind": null,
          "resources_ids": [
            "nfs_data_drbd-clone"
          ]
        },
        {
          "set_id": "colocation_set-nfs_server_set-1",
          "sequential": null,
          "require_all": null,
          "ordering": null,
          "action": null,
          "role": null,
          "score": null,
          "kind": null,
          "resources_ids": [
            "nfs_data_infodir",
            "nfs_data_software",
            "nfs_data_animaletti",
            "nfs_data_multimedia",
            "nfs_ipv4",
            "nfs_ipv6",
            "nfs_server",
            "nfs_export_root",
            "nfs_export_software",
            "nfs_export_multimedia",
            "nfs_export_animaletti"
          ]
        }
      ],
      "attributes": {
        "constraint_id": "colocation_set-nfs_server",
        "score": "INFINITY",
        "influence": null,
        "lifetime": []
      }
    }
  ],


Reproducible: Always

Steps to Reproduce:
1. Create a Pacemaker cluster
2. Create some resources and resource constraints sets for ordering or colocation
3. issue pcs constraint
Actual Results:
resources are ordered alphabetically instead of the order in the CIB

Expected Results:
resources are ordered literally as in the CIB

Comment 2 Luca Cavana 2026-05-14 04:14:46 UTC
Hello,

there is the same bug in "pcs resource relations"; these are ordered alphabetically instead of the actual order as they are started/stopped by the cluster.

Should I open a new bug or can you take care of this here?

Thanks,
Luca

Comment 3 Tomas Jelinek 2026-05-14 07:09:19 UTC
Luca, the "pcs resource relations" issue is most likely unrelated to this one. Could you open a new bug and provide a reproducer with expected and actual results? Thank you.

Comment 4 Luca Cavana 2026-05-14 14:01:57 UTC
Thank you Tomas,

opened https://bugzilla.redhat.com/show_bug.cgi?id=2477435

Comment 5 Fedora Update System 2026-05-18 18:08:45 UTC
FEDORA-2026-c0f7d885ee (pcs-0.12.2-2.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-c0f7d885ee

Comment 6 Fedora Update System 2026-05-18 18:12:55 UTC
FEDORA-2026-d420bebe72 (pcs-0.12.2-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-d420bebe72

Comment 7 Fedora Update System 2026-05-18 18:18:22 UTC
FEDORA-2026-a5176717a9 (pcs-0.12.2-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-a5176717a9

Comment 8 Fedora Update System 2026-05-19 02:25:17 UTC
FEDORA-2026-d420bebe72 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-d420bebe72`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-d420bebe72

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2026-05-19 02:44:20 UTC
FEDORA-2026-c0f7d885ee has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-c0f7d885ee`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-c0f7d885ee

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2026-06-10 00:55:13 UTC
FEDORA-2026-d420bebe72 (pcs-0.12.2-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2026-06-10 01:08:38 UTC
FEDORA-2026-c0f7d885ee (pcs-0.12.2-2.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.