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 2216308 - pcp hacluster pmda doesn't report dc status properly
Summary: pcp hacluster pmda doesn't report dc status properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcp
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 9.3
Assignee: Nathan Scott
QA Contact: Jan Kurik
Jacob Taylor Valdez
URL:
Whiteboard:
Depends On:
Blocks: 2219731 2222858
TreeView+ depends on / blocked
 
Reported: 2023-06-20 19:40 UTC by Ross Sponhholtz
Modified: 2023-11-07 09:36 UTC (History)
6 users (show)

Fixed In Version: pcp-6.0.5-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2219731 2222858 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:30:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-160327 0 None None None 2023-06-20 19:44:52 UTC
Red Hat Product Errata RHBA-2023:6406 0 None None None 2023-11-07 08:30:52 UTC

Description Ross Sponhholtz 2023-06-20 19:40:40 UTC
Description of problem:
The hacluster pmda in pcp executes the "crm_mon -X --inactive" command to retrieve cluster information.  In RHEL 9.x, the format of the output of that command has changed somewhat, as compared to previous versions.  Due to this, the PMDA does not process this data correctly, and returns incorrect data.  

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

How reproducible:
100%

Steps to Reproduce:
1.set up RHEL 9.2 cluster
2.set up pcp, pmproxy, and hacluster PMDA
3. perform curl http://localhost:44322/metrics?names=ha_cluster| grep ha_cluster_pacemaker_nodes_status_dc


Actual results:
# TYPE ha_cluster_pacemaker_nodes_status_dc gauge
ha_cluster_pacemaker_nodes_status_dc{hostname="rh9dhdb00l1c0",instname="rh9dhdb00l0c0",machineid="dc7028ce53a64b0bba7d52ee52cf568a",domainname="localdomain",instid="0"} 0
ha_cluster_pacemaker_nodes_status_dc{hostname="rh9dhdb00l1c0",instname="rh9dhdb00l1c0",machineid="dc7028ce53a64b0bba7d52ee52cf568a",domainname="localdomain",instid="1"} 0


Expected results:
since every cluster has one DC, the command in #3 should return at least one line that has value of 1

Additional info:
"crm_mon -C --inactive" is now returning some extra fields "health" and "feature_set": 
   <node name="rh9dhdb00l0c0" id="1" online="true" standby="false" standby_onfail="false" maintenance="false" pending="false" unclean="false" health="green" feature_set="3.16.2" shutdown="false" expected_up="true" is_dc="false" resources_running="5" type="member"/>

The processing of these in the pmda pacemaker.c has not taken into account these new fields (see line 537 in https://github.com/performancecopilot/pcp/blob/177b3d6294eb6b6bc3e2d9dcafdc09b6930554af/src/pmdas/hacluster/pacemaker.c).

Comment 1 Nathan Scott 2023-06-21 02:04:26 UTC
Thanks Ross, yep, looks like we have some work to do here.

I've CC'd my colleague Paul Evans who knows this code best for his input.
One thing we'll need will be captured output of the command in the updated
format to use in PCP regression test qa/1897 (in the pcp github repo) - in
the form of qa/hacluster/hacluster-root-001.tgz there.

Paul, do you have a hacluster test setup handy where you can capture that?
And do you have cycles to update the code? (I can help with that if needed
once we have the test data to work with).

cheers.

Comment 2 Ross Sponhholtz 2023-06-21 17:32:21 UTC
I have a 9.2 cluster that I've been testing with, and I put sample output from crm_mon -X in a github repo here: https://bugzilla.redhat.com/show_bug.cgi?id=2216308
I threw together a little program (in the github) to test this out, and updated for the 9.2 output.

Let me know if there is anything I can do to help, since getting this corrected is pretty important for our support of RHEL 9.2 in Azure Monitor for SAP Solutions.

Comment 3 Ross Sponhholtz 2023-06-21 17:33:46 UTC
sorry here is my github: https://github.com/rsponholtz/pmtest

Comment 4 Nathan Scott 2023-06-22 07:39:45 UTC
Thanks Ross.  I'm away until July 3rd so I am hoping Paul has some cycles to make progress while I'm away.
Otherwise I'll take you up on that kind offer for assistance and work with you to get this resolved shortly after I return.

Comment 5 Paul Evans 2023-06-22 11:36:46 UTC
Hi Nathan, Ross.

It looks like pacemaker 2.1.5 added the extra fields to the output from crm_mon
which causes the issue for collecting the ha_cluster_pacemaker_nodes_status_dc.
I've attached a patch which will fix this issue for RHEL 9.2 (I believe this
could be an issue in RHEL8.8 also).

I've provided a merge-request for upstream also to fix this issue.

Regards,

Paul.

Comment 8 RD 2023-06-22 18:03:54 UTC
(In reply to Paul Evans from comment #5)
> Hi Nathan, Ross.
> 
> It looks like pacemaker 2.1.5 added the extra fields to the output from
> crm_mon
> which causes the issue for collecting the
> ha_cluster_pacemaker_nodes_status_dc.
> I've attached a patch which will fix this issue for RHEL 9.2 (I believe this
> could be an issue in RHEL8.8 also).
> 
> I've provided a merge-request for upstream also to fix this issue.
> 
> Regards,
> 
> Paul.

Hi,

Where do we find the attached patch?  I don't see an attachment to the BZ. 

Thanks!
Ralitza

Comment 9 Nathan Scott 2023-06-24 06:56:33 UTC
Hi Ralitza, you can find Paul's latest updates here:
https://github.com/performancecopilot/pcp/pull/1770

Comment 14 Jan Kurik 2023-06-26 13:55:22 UTC
Verifying using the upstream testsuite.

Comment 25 errata-xmlrpc 2023-11-07 08:30:40 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 (pcp 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/RHBA-2023:6406


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