Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-92044

'pcs resource delete' fails when target-role is not capitalized properly [rhel-9]

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • pcs-0.11.10-1.el9
    • Yes
    • Important
    • ZStream
    • rhel-ha
    • 17
    • 26
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Approved Blocker
    • Bug Fix
    • Hide
      .`pcs` commands no longer fail due to improperly capitalized `target-role` values

      Before this update, if a resource's `target-role` meta-attribute was set to a value that was not capitalized, such as `stopped` instead of `Stopped`, `pcs` failed to parse the cluster status. This parsing error caused `pcs status query resource` commands and commands for deleting resources, including `pcs resource delete`, to fail.

      With this update, the cluster status parsing logic in `pcs` has been made more flexible.

      As a result, `pcs` commands function correctly even when a resource has a `target-role` meta-attribute with an improperly capitalized value.
      Show
      .`pcs` commands no longer fail due to improperly capitalized `target-role` values Before this update, if a resource's `target-role` meta-attribute was set to a value that was not capitalized, such as `stopped` instead of `Stopped`, `pcs` failed to parse the cluster status. This parsing error caused `pcs status query resource` commands and commands for deleting resources, including `pcs resource delete`, to fail. With this update, the cluster status parsing logic in `pcs` has been made more flexible. As a result, `pcs` commands function correctly even when a resource has a `target-role` meta-attribute with an improperly capitalized value.
    • Done
    • Done
    • Done
    • Not Required
    • None

      This is a clone of issue RHEL-92043 to use for version rhel-9.7

      Original description:
      When target-role meta attribute of a resource is not capitalized as defined by pacemaker specification, pcs is unable to parse cluster status xml. This results in the 'pcs resource delete' command failing.

      Reproducer:

      # pcs resource create d3 ocf:pacemaker:Dummy
      # pcs resource meta d3 target-role=started
      # pcs resource delete d3
      Stopping resource 'd3' before deleting
      Error: Cannot load cluster status, xml does not describe valid cluster status: Resource 'd3' contains an unknown role 'started'
      Error: Errors have occurred, therefore pcs is unable to continue
      

      pcs version: pcs-0.12.0-3.el10.x86_64

              mmazoure Michal Mazourek
              watson-automation Watson Automation
              Peter Romancik Peter Romancik
              Michal Mazourek Michal Mazourek
              Michal Stubna Michal Stubna
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: