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 1210844 - [RFE] please offer more concise help/syntax reference
Summary: [RFE] please offer more concise help/syntax reference
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-10 17:06 UTC by Jan Pokorný [poki]
Modified: 2020-12-15 07:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:34:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1309643 0 low CLOSED not enough specific help for some cli subcommands 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1376103 0 medium CLOSED pcs error reporting should be improved and reply shortened so admins don't have to scroll 2021-02-22 00:41:40 UTC

Internal Links: 1309643 1376103

Description Jan Pokorný [poki] 2015-04-10 17:06:11 UTC
Frankly, when one is accustomed to pcs approach but sometimes needs just
a bit of help, a hint that would keep they going, using "pcs SOMETHING -h"
is an overkill (several screens of detailed explanation) while one really
only needs a brief syntax overview.


I would propose following two evolutionary steps:

1. add "help" subcommand, where "pcs help SOMETHING" would be a direct
   equivalent of "pcs SOMETHING -h" (incl. SOMETHING being left out)
   - this is quite popular, used in git (and plenty of other VCSs),
     virsh, etc. and can pretty much be first choice for *nix CLI
     newcomers

2. add "syntax" subcommand and/or (depending on the previous point
   inclusion) "pcs SOMETHING -s" (or -S at least) invocation form that
   would provide one with demanded brief syntax overview
   - this would ideally be quite akin to what iproute2 (ip) command
     will show you at the place one might expect full-blown help (which
     is then in dedicated man pages)
   - I hope this wouldn't be too hard as it's mostly a task of filtering
     existing help texts (grabbing just the syntax-related parts)

Demo of point 2.:

# pcs syntax status   # or pcs status -s
> pcs status [commands]...
>
> commands :=
>    [status] [--full]
>    resources
>    groups
>    cluster
>    corosync
>    nodes [corosync|both|config]
>    pcsd <node> ...
>    xml

I've picked "status" for brevity, but more convoluted subcommands would
show even better "compression ratio" (and hence practival value).

Thanks for considering.

Comment 1 Chris Feist 2015-04-13 22:12:40 UTC
Jan,

Currently the 'pcs <...> -h' should only be giving details on the command you're trying to run.

For Example:

[root@rh7-2 ~]# pcs status pcsd -h

Usage: pcs status pcsd...
    pcsd <node> ...
        Show the current status of pcsd on the specified nodes


It doesn't show the full status output, only the instructions for 'pcs status pcsd'.

Or here, where there are two possible commands:
[root@rh7-2 ~]# pcs resource failcount -h

Usage: pcs resource failcount...
    failcount show <resource id> [node]
        Show current failcount for specified resource from all nodes or
        only on specified node

    failcount reset <resource id> [node]
        Reset failcount for specified resource on all nodes or only on
        specified node.  This tells the cluster to forget how many times
        a resource has failed in the past.  This may allow the resource to
        be started or moved to a more preferred location.


It doesn't show all 'pcs resource' commands, just the ones that start with 'pcs resource failcount'.

While it isn't as compact as the ip commands, it does provide the full information for the user without using too many lines of output.

I'm marking this at WONTFIX (for now) because I don't think it makes sense to implement this in the near term.  If we do get lots of complaints, we can always re-open and revisit this issue.

Comment 2 Jan Pokorný [poki] 2015-04-16 12:26:57 UTC
Fair enough.  But from what I've heard from Tomáš, there is long-term goal
to have single authoritative meta-source for all help screens, man pages
and bash completion, so if there's ever and overhaul in this area, please
reconsider this bug (keeping the respective data in a structured way is
3/4 of the solution for this bug, anyway).

Comment 3 Chris Feist 2015-04-17 22:01:52 UTC
Definitely. Once we have one place for all the documentation this will be a lot simpler to implement/maintain.

Comment 4 Jan Pokorný [poki] 2015-04-29 11:01:32 UTC
Also, one can anticipate a popular demand for such a reference, as
demonstrated by hand-crafting requested overview just to point out
a missing item on the ML:

http://clusterlabs.org/pipermail/users/2015-April/000251.html

Comment 5 Jan Pokorný [poki] 2015-06-05 09:28:45 UTC
re [comment 0]:

> 1. add "help" subcommand, where "pcs help SOMETHING" would be a direct
>    equivalent of "pcs SOMETHING -h" (incl. SOMETHING being left out)
>    - this is quite popular, used in git (and plenty of other VCSs),
>      virsh, etc. and can pretty much be first choice for *nix CLI
>      newcomers

Another (even Red Hat associated) pieces of software supporting "help"
subcommands: yum and dnf.

Comment 6 Jan Pokorný [poki] 2016-08-09 13:42:36 UTC
I am reopening the bug as it needs new reconsideration and either closing
as duplicate to wider-scoped bug (context including bash-completion, etc.,
see [comment 2]) or properly justifying why the desired high-level
overview is not provided (more on this below).

Note that for the purpose of clufter (colorozing the longest valid prefix
sequence of command atoms in pcs syntax), I've manually tracked down
the overall commands hierarchy:

https://pagure.io/clufter/blob/b4b12614e1d243c0ed21b3be7896a153fb02d219/f/filters/cmd_wrap.py#_23

and guess what ... there are some 180 basic, standalone pcs commands
(not counting the possible variations of each).

In this light, I consider it a must to have a syntax reference as
requested (overall plus possibility to drill down with command atoms),
only to allow one to grok the overall scope of what can be done.
(Utterly) verbose/long help screen won't cut it for this purpose.

Comment 7 Jan Pokorný [poki] 2016-08-11 14:00:37 UTC
It can be speculated that people miss such basic commands as
"pcs cluster node add" because of the lack of requested syntax
reference/commands overview:

http://oss.clusterlabs.org/pipermail/users/2016-August/003715.html

Comment 9 RHEL Program Management 2020-12-15 07:34:03 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.


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