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 1984120 - Regressions in crm_attribute in upstream Pacemaker 2.1.0
Summary: Regressions in crm_attribute in upstream Pacemaker 2.1.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pacemaker
Version: 8.4
Hardware: All
OS: All
urgent
high
Target Milestone: beta
: 8.5
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1872754 1984130
TreeView+ depends on / blocked
 
Reported: 2021-07-20 17:57 UTC by Ken Gaillot
Modified: 2024-03-07 14:29 UTC (History)
3 users (show)

Fixed In Version: pacemaker-2.1.0-4.el8
Doc Type: No Doc Update
Doc Text:
The issue will not be present in GA release
Clone Of:
: 1984130 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:44:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:4267 0 None None None 2021-11-09 18:45:16 UTC

Description Ken Gaillot 2021-07-20 17:57:17 UTC
Description of problem: RHEL 8.5 and 9.0 beta rebased on upstream 2.1.0, which has been found to have regressions in the crm_attribute command (and its crm_master and crm_failcount wrappers).


Version-Release number of selected component (if applicable): upstream 2.1.0


How reproducible: trivially


Steps to Reproduce:
1. Configure and start a cluster.
2. Use crm_attribute to set a node attribute with a negative integer value.
3. Use crm_attribute's hidden --get-value option (a deprecated alias for --query) to check an attribute value.

Actual results: Setting a negative value fails with an option parsing error. Using --get-value wrongly requires (and ignores) an option argument.


Expected results: Setting a negative value succeeds. Using --get-value does not require an option argument.

Comment 1 Ken Gaillot 2021-07-20 18:38:58 UTC
Fixed upstream by commits ea5510d and ef054d9

Comment 6 Markéta Smazová 2021-08-12 10:22:07 UTC
before fix:
-----------

>   [root@virt-021 ~]# rpm -q pacemaker
>   pacemaker-2.1.0-3.el8.x86_64

Setup a cluster:

>   [root@virt-021 ~]# pcs status
>   Cluster name: STSRHTS1878
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-023 (version 2.1.0-3.el8-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 12:16:06 2021
>     * Last change:  Thu Aug 12 12:16:03 2021 by root via crm_attribute on virt-023
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-021 virt-023 ]

>   Full List of Resources:
>     * fence-virt-021	(stonith:fence_xvm):	 Started virt-021
>     * fence-virt-023	(stonith:fence_xvm):	 Started virt-023

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

Set a node attribute with a negative integer value. Use crm_attribute's hidden `--get-value` option 
(a deprecated alias for `--query`) to check an attribute value:

>   [root@virt-021 ~]# crm_attribute --node virt-021 --name test2 --update -22
>   crm_attribute: Unknown option -2
>   [root@virt-021 ~]# echo $?
>   64
Setting a negative value failed with an option parsing error.

>   [root@virt-021 ~]# crm_attribute --node virt-021 --name test2 --get-value
>   crm_attribute: Missing argument for --get-value

Using `--get-value` wrongly requires (and ignores) an option argument.



after fix:
----------

>   [root@virt-542 ~]# rpm -q pacemaker
>   pacemaker-2.1.0-5.el8.x86_64

Setup a cluster:

>   [root@virt-542 ~]# pcs status
>   Cluster name: STSRHTS30566
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-543 (version 2.1.0-5.el8-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 12:17:45 2021
>     * Last change:  Thu Aug 12 12:17:37 2021 by root via crm_attribute on virt-542
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-542 virt-543 ]

>   Full List of Resources:
>     * fence-virt-542	(stonith:fence_xvm):	 Started virt-542
>     * fence-virt-543	(stonith:fence_xvm):	 Started virt-543

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

Set a node attribute with a negative integer value. Use crm_attribute's hidden `--get-value` option 
(a deprecated alias for `--query`) to check an attribute value:

>   [root@virt-542 ~]# crm_attribute --node virt-542 --name test2 --update -22
>   [root@virt-542 ~]# echo $?
>   0
Setting a negative value succeeded.

>   [root@virt-542 ~]# crm_attribute --node virt-542 --name test2 --get-value
>   scope=nodes  name=test2 value=-22

Using `--get-value` does not require an option argument.


Display cluster with Node Attributes:

>   [root@virt-542 ~]# crm_mon -1A
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-543 (version 2.1.0-5.el8-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 11:50:30 2021
>     * Last change:  Thu Aug 12 11:49:19 2021 by root via crm_attribute on virt-542
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-542 virt-543 ]

>   Active Resources:
>     * fence-virt-542	(stonith:fence_xvm):	 Started virt-542
>     * fence-virt-543	(stonith:fence_xvm):	 Started virt-543

>   Node Attributes:
>     * Node: virt-542:
>       * test2                           	: -22



marking verified in pacemaker-2.1.0-5.el8

Comment 8 errata-xmlrpc 2021-11-09 18:44:54 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-2021:4267


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