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

Fixed In Version: pacemaker-2.1.0-6.el9
Doc Type: No Doc Update
Doc Text:
The issue will not be in beta or GA release
Clone Of: 1984120
Environment:
Last Closed: 2021-12-07 21:57:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ken Gaillot 2021-07-20 18:42:03 UTC
+++ This bug was initially created as a clone of Bug #1984120 +++

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.

--- Additional comment from Ken Gaillot on 2021-07-20 18:38:58 UTC ---

Fixed upstream by commits ea5510d and ef054d9

Comment 7 Markéta Smazová 2021-08-12 14:34:25 UTC
before fix:
-----------

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

Setup a cluster:

>   [root@virt-494 ~]# pcs status
>   Cluster name: STSRHTS18167
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-494 (version 2.1.0-5.el9-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 16:03:48 2021
>     * Last change:  Thu Aug 12 16:03:25 2021 by root via cibadmin on virt-494
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-494 virt-495 ]

>   Full List of Resources:
>     * fence-virt-494	(stonith:fence_xvm):	 Started virt-494
>     * fence-virt-495	(stonith:fence_xvm):	 Started virt-495

>   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-494 ~]# crm_attribute --node virt-494 --name test1 --update -11
>   crm_attribute: Unknown option -1
>   [root@virt-494 ~]# echo $?
>   64
Setting a negative value failed with an option parsing error.

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

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



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

>   [root@virt-050 ~]# rpm -q pacemaker
>   pacemaker-2.1.0-6.el9.x86_64

Setup a cluster:

>   [root@virt-050 ~]# pcs status
>   Cluster name: STSRHTS6381
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-050 (version 2.1.0-6.el9-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 15:17:38 2021
>     * Last change:  Mon Aug  9 14:35:29 2021 by root via cibadmin on virt-049
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-049 virt-050 ]

>   Full List of Resources:
>     * fence-virt-049	(stonith:fence_xvm):	 Started virt-049
>     * fence-virt-050	(stonith:fence_xvm):	 Started virt-050

>   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-050 ~]# crm_attribute --node virt-050 --name test1 --update -11
>   [root@virt-050 ~]# echo $?
>   0
Setting a negative value succeeded.

>   [root@virt-050 ~]# crm_attribute --node virt-050 --name test1 --get-value
>   scope=nodes  name=test1 value=-11

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


Display cluster with Node Attributes:

>   [root@virt-050 ~]# crm_mon -1A
>   Cluster Summary:
>     * Stack: corosync
>     * Current DC: virt-050 (version 2.1.0-6.el9-7c3f660707) - partition with quorum
>     * Last updated: Thu Aug 12 15:26:54 2021
>     * Last change:  Thu Aug 12 15:25:56 2021 by root via crm_attribute on virt-050
>     * 2 nodes configured
>     * 2 resource instances configured

>   Node List:
>     * Online: [ virt-049 virt-050 ]

>   Active Resources:
>     * fence-virt-049	(stonith:fence_xvm):	 Started virt-049
>     * fence-virt-050	(stonith:fence_xvm):	 Started virt-050

>   Node Attributes:
>     * Node: virt-050:
>       * test1                           	: -11


marking verified in pacemaker-2.1.0-6.el9


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