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

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

Linking RHIVOS CVEs to...Migration: Automation ...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhel-10.1
    • rhel-10.0
    • pcs
    • Yes
    • Important
    • ZStream
    • rhel-sst-high-availability
    • 17
    • 26
    • 0
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Approved Blocker
    • Bug Fix
    • Hide
      Cause: User sets the 'target-role' meta attribute value that is not capitalized as defined by pacemaker specification.
      Consequence: pcs is unable to parse cluster status, becasue it expects the 'target-role' value to be capitalized as defined by pacemaker specification. This results in `pcs resource delete` failing.
      Fix: Fixed cluster status parsing to not fail when 'target-role' values is not capitalized properly. This also fixes the `pcs resource delete|remove` command, but also `pcs booth|stonith delete|remove`, `pcs cluster node delete-remote|remove-remote`, and `pcs status query resource` commands, when there is improperly capitalized 'target-role' meta attribute.
      Result: Users can use the `pcs resource delete` commands without error, when there is a resource with improperly capitalized 'target-role' meta attribute.
      Show
      Cause: User sets the 'target-role' meta attribute value that is not capitalized as defined by pacemaker specification. Consequence: pcs is unable to parse cluster status, becasue it expects the 'target-role' value to be capitalized as defined by pacemaker specification. This results in `pcs resource delete` failing. Fix: Fixed cluster status parsing to not fail when 'target-role' values is not capitalized properly. This also fixes the `pcs resource delete|remove` command, but also `pcs booth|stonith delete|remove`, `pcs cluster node delete-remote|remove-remote`, and `pcs status query resource` commands, when there is improperly capitalized 'target-role' meta attribute. Result: Users can use the `pcs resource delete` commands without error, when there is a resource with improperly capitalized 'target-role' meta attribute.
    • Proposed
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      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

              mpospisi@redhat.com Michal Pospisil
              tojeline@redhat.com Tomas Jelinek
              Peter Romancik Peter Romancik
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: