Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1774888

Summary: do not parse crm_mon's plaintext output in the 'pcs resource status' command
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED WONTFIX QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: cfeist, clumens, cluster-maint, cluster-qe, idevat, kgaillot, kwenning, mlisik, mnovacek, mpospisi, omular, tojeline
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1363907 Environment:
Last Closed: 2021-05-21 07:30:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1363907    
Bug Blocks:    

Description Tomas Jelinek 2019-11-21 08:24:09 UTC
With the planned changes in crm_mon we can reliably display status of resources in the 'pcs resource status' command: ask crm_mon to return just resources instead of parsing its whole plaintext output in pcs. We still need to keep the old code for compatibility with old pacemaker versions.


+++ This bug was initially created as a clone of Bug #1363907 +++

+++ This bug was initially created as a clone of Bug #1361533 +++

--- Additional comment from Tomas Jelinek on 2016-08-03 07:09:39 EDT ---

(In reply to Ken Gaillot from comment #3)
> I'll try to fix the header issue for 7.3, but understand that the console
> output changes from one pacemaker version to another, so it can't be relied
> on in the long term.
> 
> Is your goal to display only certain sections of the crm_mon output? For
> example, just the resources, or just the resources and the failcounts. If

yes

> that's the case, I have an idea for an enhancement that could make it into
> 7.4. We could add an --include option to crm_mon that would take a
> comma-separated list of sections you want to display. E.g. "crm_mon
> --include resources,failcounts". Would that be sufficient?

That would be great!

--- Additional comment from Ken Gaillot on 2019-11-20 16:59:14 CET ---

To summarize the current plan, the following design will take care of this bz, Bug 1300597, and Bug 1300604:

crm_mon will gain new "--include" and "--exclude" options to select what sections are shown. For example, to show only the top summary and the nodes status, you could use "crm_mon --include=none,summary,nodes". Or to show just the resources section, you could use "crm_mon --include=none,resources". (The "none" is to clear the defaults. You could equally keep the defaults and use "--exclude" to specify everything you don't want to see.)

Some of these section names will take an optional qualifier as "SECTION:QUALIFIER". For "nodes" and "resources", this qualifier will be an XML ID, either of a particular node or resource, or of a tag. When a qualifier is given, crm_mon will show only the requested nodes and/or resources.

For example, to show just the status of node1, you could use "crm_mon --include=none,nodes:node1". Or just the status of rsc1, "crm_mon --include=none,resources:rsc1".

For an explanation of how tagging works in the Pacemaker configuration, see the "Tagging configuration elements" section of the upstream "Pacemaker Explained" documentation:

    https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#_tagging_configuration_elements

pcs will need the ability to set tags (Bug 1684676) as well as new options to use this new selection syntax.

Comment 3 RHEL Program Management 2021-05-21 07:30:55 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.