Bug 1300597
Summary: | add option to crm_mon to display status of a single resource | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Tomas Jelinek <tojeline> |
Component: | pacemaker | Assignee: | Chris Lumens <clumens> |
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | cfeist, cluster-maint, cluster-qe, jkortus, jruemker, kgaillot, michele, mnovacek, msmazova, phagara, sbradley, tojeline |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | 8.4 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | pacemaker-2.0.5-1.el8 | Doc Type: | No Doc Update |
Doc Text: |
The corresponding pcs functionality should be documented instead
|
Story Points: | --- |
Clone Of: | 1290830 | Environment: | |
Last Closed: | 2021-05-18 15:26:41 UTC | Type: | Feature Request |
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: | 1682116, 1752538, 1885645 | ||
Bug Blocks: | 1290830, 1679810 |
Comment 1
Tomas Jelinek
2016-01-21 09:26:32 UTC
This will not be ready in the 7.3 timeframe. Unfortunately, due to capacity constraints, this will not be ready for 7.4. It will be a priority for 7.5. Due to a short time frame and limited capacity, this will not make 7.5. It might be a good idea to make the "query language" equivalent to "constraint specification language", for resources, it means, for instance: - #rsc-pattern eq ip-.* - #pattern:value:port eq 80 On the other hand, if we are going to mix tagging for the query purposes ([bug 1513550]) in, we shoud conversely reflect that also at the level of the constraints: - #tag eq precious_svcs s/#param:value:port eq 80/#param:value:port eq 80/ Moving to RHEL 8 only, as this will not make 7.7, which will be the last RHEL 7 feature release Setting QA CondNAK due to capacity constraints. To summarize the current plan, the following design will take care of this bz, Bug 1300604, and Bug 1363907: 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. The --include/--exclude options have been merged as described, but the single-resource/single-node is likely to change from what is described in Comment 12 re-adding qa_ack+ New feature merged upstream as of https://github.com/ClusterLabs/pacemaker/pull/2092 Just out of curiosity - could we get rid of the --include=none? It's counter-intuitive for me. If I'm specifying --include I'm already willing to get filtered results. Having to specify "none" all the time feels useless. --exclude does not have it either (like --exclude=all,...), right? I would simply assume the "none" is there by default and clearing all defaults, delivering only the specified sections. (In reply to Jaroslav Kortus from comment #19) > Just out of curiosity - could we get rid of the --include=none? It's > counter-intuitive for me. If I'm specifying --include I'm already willing to > get filtered results. Having to specify "none" all the time feels useless. > --exclude does not have it either (like --exclude=all,...), right? I would > simply assume the "none" is there by default and clearing all defaults, > delivering only the specified sections. We do have --exclude=all, which is identical to --include=none. Most of the time, users don't want to clear the defaults, but add on top of them, so that's how --include/--exclude work by default. It's similar to how previously, if you gave "crm_mon --failcounts", it would show fail counts as well as the usual information -- "crm_mon --include=failcounts" works the same way. In the less common case someone wants to show *only* one section, then they have to specify --include=none,<section> or --exclude=all --include=<section>. Check that the new option is documented in crm_mon man/help. > [root@virt-245 ~]# rpm -q pacemaker > pacemaker-2.0.5-2.el8.x86_64 > [root@virt-245 ~]# man crm_mon > PACEMAKER(8) System Administration Utilities PACEMAKER(8) > NAME > Pacemaker - Part of the Pacemaker cluster resource manager > SYNOPSIS > crm_mon mode [options] > DESCRIPTION > Provides a summary of cluster's current state. > Outputs varying levels of detail in a number of different formats. > OPTIONS > [...] > Display Options: > -I, --include=SECTION(s) > A list of sections to include in the output. See `Output Control` help for more information. > -U, --exclude=SECTION(s) > A list of sections to exclude from the output. See `Output Control` help for more information. > --node=NODE > When displaying information about nodes, show only what's related to the given node, or to all nodes > tagged with the given tag > --resource=RSC > When displaying information about resources, show only what's related to the given resource, or to > all resources tagged with the given tag > [root@virt-245 ~]# crm_mon --help-display > Usage: > crm_mon [OPTION?] > Provides a summary of cluster's current state. > Outputs varying levels of detail in a number of different formats. > Display Options: > -I, --include=SECTION(s) A list of sections to include in the output. > See `Output Control` help for more information. > -U, --exclude=SECTION(s) A list of sections to exclude from the output. > See `Output Control` help for more information. > --node=NODE When displaying information about nodes, show only what's related to the given > node, or to all nodes tagged with the given tag > --resource=RSC When displaying information about resources, show only what's related to the given > resource, or to all resources tagged with the given tag > [...] Display a single resource. > [root@virt-245 ~]# crm_mon --resource=dummy --one-shot > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 14:49:04 2020 > * Last change: Mon Nov 9 14:48:14 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 3 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * dummy (ocf::pacemaker:Dummy): Started virt-245 Display resource group. > [root@virt-245 ~]# crm_mon --resource=dummy-group -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 16:01:05 2020 > * Last change: Mon Nov 9 16:00:57 2020 by root via cibadmin on virt-246 > * 2 nodes configured > * 6 resource instances configured (2 DISABLED) > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * Resource Group: dummy-group: > * dummy5 (ocf::pacemaker:Dummy): Started virt-245 > * dummy6 (ocf::pacemaker:Dummy): Started virt-245 Display cloned resource. > [root@virt-245 ~]# crm_mon --resource=dummy-clone -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:40:19 2020 > * Last change: Mon Nov 9 15:40:04 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 4 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * Clone Set: dummy-clone [dummy]: > * Started: [ virt-245 virt-246 ] Use `--include=none,resources` option to display only the resource section of crm_mon and view only "dummy-clone". > [root@virt-245 ~]# crm_mon --include=none,resources --resource=dummy-clone -1 > Active Resources: > * Clone Set: dummy-clone [dummy]: > * Started: [ virt-245 virt-246 ] Try using two `--resource` options in one command. The `--resource` option accepts a resource name or a tag as argument. Only a single `--resource` option is accepted by crm_mon command (latter instances overwrite earlier ones, ie. `--resource=rsc1 --resource=rsc2` shows status for resource rsc2). > [root@virt-245 ~]# crm_mon --resource=dummy-group --resource=dummy-clone -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:44:32 2020 > * Last change: Mon Nov 9 15:40:04 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 4 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * Clone Set: dummy-clone [dummy]: > * Started: [ virt-245 virt-246 ] Display resources tagged with `pcs tag`. > [root@virt-246 ~]# pcs tag create tagged_resources dummy1 dummy2 > [root@virt-245 ~]# crm_mon --resource=tagged_resources -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 16:11:16 2020 > * Last change: Mon Nov 9 16:10:43 2020 by root via cibadmin on virt-246 > * 2 nodes configured > * 8 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * dummy1 (ocf::pacemaker:Dummy): Started virt-246 > * dummy2 (ocf::pacemaker:Dummy): Started virt-246 Display disabled resource. In order to see details of disabled resource, option `--inactive` must be added as well. > [root@virt-245 ~]# pcs resource disable dummy-clone > [root@virt-245 ~]# crm_mon --resource=dummy-clone --one-shot > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:53:02 2020 > * Last change: Mon Nov 9 15:52:44 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 5 resource instances configured (2 DISABLED) > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * No active resources > [root@virt-245 ~]# crm_mon --resource=dummy-clone --one-shot --inactive > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:53:21 2020 > * Last change: Mon Nov 9 15:52:44 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 5 resource instances configured (2 DISABLED) > Node List: > * Online: [ virt-245 virt-246 ] > Full List of Resources: > * Clone Set: dummy-clone [dummy] (disabled): > * Stopped (disabled): [ virt-245 virt-246 ] Display pacemaker remote resource "virt-484". > [root@virt-482 ~]# crm_mon --resource=virt-484 -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-482 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 16:15:10 2020 > * Last change: Mon Nov 9 16:14:41 2020 by root via cibadmin on virt-482 > * 3 nodes configured > * 4 resource instances configured > Node List: > * Online: [ virt-482 virt-483 ] > * RemoteOnline: [ virt-484 ] > Active Resources: > * virt-484 (ocf::pacemaker:remote): Started virt-482 Display resource "dummy" running on Pacemaker remote node. > [root@virt-482 ~]# crm_mon --resource=dummy -1 > Cluster Summary: > * Stack: corosync > * Current DC: virt-482 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 16:17:30 2020 > * Last change: Mon Nov 9 16:16:23 2020 by virt-484 via cibadmin on virt-482 > * 3 nodes configured > * 5 resource instances configured > Node List: > * Online: [ virt-482 virt-483 ] > * RemoteOnline: [ virt-484 ] > Active Resources: > * dummy (ocf::pacemaker:Dummy): Started virt-484 Try running the command without specifying the resource name. > [root@virt-245 ~]# crm_mon --resource > crm_mon: Missing argument for --resource Try displaying non-existing resource "dummy5", allow crm_mon to display updates (option `--one-shot` is not used). > [root@virt-245 ~]# crm_mon --resource=dummy5 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:49:00 2020 > * Last change: Mon Nov 9 15:40:04 2020 by root via cibadmin on virt-245 > * 2 nodes configured > * 4 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * No active resources Resource "dummy5" is not found, but when it is later added, crm_mon is updated with information about it. > [root@virt-246 ~]# pcs resource create dummy5 ocf:pacemaker:Dummy > [root@virt-245 ~]# crm_mon --resource=dummy5 > Cluster Summary: > * Stack: corosync > * Current DC: virt-246 (version 2.0.5-2.el8-31aa4f5515) - partition with quorum > * Last updated: Mon Nov 9 15:49:45 2020 > * Last change: Mon Nov 9 15:49:43 2020 by root via cibadmin on virt-246 > * 2 nodes configured > * 5 resource instances configured > Node List: > * Online: [ virt-245 virt-246 ] > Active Resources: > * dummy5 (ocf::pacemaker:Dummy): Started virt-245 marking verified in pacemaker-2.0.5-2.el8 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:1782 |