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 1476862 - pcs quorum help: Improve 'device add' syntax guidance
Summary: pcs quorum help: Improve 'device add' syntax guidance
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-31 16:14 UTC by John Ruemker
Modified: 2018-10-30 08:06 UTC (History)
8 users (show)

Fixed In Version: pcs-0.9.165-1.el7
Doc Type: Bug Fix
Doc Text:
Make the man page and usage for the 'pcs quorum device add' command more comprehensible. Clarify which parameters are mandatory and which are optional. Provide pointers to corosync man page.
Clone Of:
Environment:
Last Closed: 2018-10-30 08:05:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (4.37 KB, patch)
2018-06-05 07:49 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1552666 0 unspecified CLOSED clufter does not filter out some corosync qdevice options (votes,tls) when it generates 'pcs quorum device add...' comma... 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:3066 0 None None None 2018-10-30 08:06:10 UTC

Internal Links: 1552666

Description John Ruemker 2017-07-31 16:14:51 UTC
Description of problem: 'pcs quorum help' currently includes this:

    device add [<generic options>] model <device model> [<model options>]
        Add a quorum device to the cluster. Quorum device needs to be created
        first by "pcs qdevice setup" command. It is not possible to use more
        than one quorum device in a cluster simultaneously. Generic options,
        model and model options are all documented in corosync-qdevice(8) man
        page.

It mentions vaguely the generic options and model options, but gives no information and lists them in [] which tends to imply optional.  Yet:

  # pcs quorum device add model net 
  Error: required options 'algorithm', 'host' are missing

The manpage doesn't make any distinction of "generic options" vs "model options", so the user would have to guess which ones apply to each category.

And the help content doesn't give any reference for the syntax either.  

A first-time user is unlikely to get this right, and would likely need some other reference to guide them through this.  That makes for a challenging user experience.

We should improve the help output so first-time users can get through this based on the help output alone. 



Version-Release number of selected component (if applicable): pcs-0.9.157-1.el7.x86_64

Comment 1 John Ruemker 2017-07-31 16:28:11 UTC
I recognize that the optional vs mandatory designation of model options results from the fact that different models could require different mandatory options.  I think we should consider just documenting this in the specific case of 'net' model, since that's all we have right now.  Or alternatively, document the generic version and then _also_ the net version.

So for example:

    device add [<corosync-qdevice options>] model <model> <model mandatory options> [<corosync-qdevice configuration>]

        Add a quorum device to the cluster. A qnetd host should be configured
        first with 'pcs qdevice setup'.  It is not possible to use more
        than one quorum device in a cluster simultaneously. 

        corosync-qdevice(8) man page lists available corosync-qdevice options 
        and configuration.  Configuration entries can be specified in 
        name=value pairs.  

    device add [<corosync-qdevice options>] model net host=<corosync-qnetd host> algorithm=(lms|ffs) [<corosync-qdevice configuration>]
        Add a quorum device to the cluster. A corosync-qnetd host should be 
        configured first with 'pcs qdevice setup'.  It is not possible to use 
        more than one quorum device in a cluster simultaneously. 

        corosync-qdevice(8) man page lists available corosync-qdevice options 
        and configuration.  Configuration entries can be specified in 
        name=value pairs.  

        Example:  
           pcs quorum device add model net host=qnetd.internal.example.com algorithm=lms tls=required

Comment 2 John Ruemker 2017-07-31 16:31:51 UTC
Apparently tls is not an allowed model option, so change the example to use one of: 

   Error: invalid quorum device model option 'tls', allowed options are: algorithm, connect_timeout, force_ip_version, host, port, tie_breaker, use --force to override

Side-node: why no tls?  Its in the manpage.

Comment 3 John Ruemker 2017-08-23 14:42:49 UTC
Turns out my understanding of the generic options was inaccurate - which I think further supports clarifying the help output.

As a result: my suggested improved text is not valid.

Comment 5 Tomas Jelinek 2017-08-23 14:51:43 UTC
(In reply to John Ruemker from comment #2)
> Apparently tls is not an allowed model option, so change the example to use
> one of: 
> 
>    Error: invalid quorum device model option 'tls', allowed options are:
> algorithm, connect_timeout, force_ip_version, host, port, tie_breaker, use
> --force to override
> 
> Side-node: why no tls?  Its in the manpage.

Pcs always sets qdevice with tls enabled.

This is worth mentioning in pcs help.

Comment 10 Tomas Jelinek 2018-05-16 14:12:38 UTC
In the meantime the support for qdevice heuristics has been added which complicates the command even further. On the other hand, there is only one model supported, so we can drop the generic version and simplify the help text a bit.

John, what do you think about this:

device add [<generic options>] model <device model> [<model options>]
        [heuristics <heuristics options>]
    Add a quorum device to the cluster. Quorum device should be configured
    first with "pcs qdevice setup". It is not possible to use more than one
    quorum device in a cluster simultaneously.
    Currently the only supported model is 'net'. It requires model options
    'algorithm' and 'host' to be specified. Options are documented in
    corosync-qdevice(8) man page; generic options are 'sync_timeout' and
    'timeout', for model net options check the quorum.device.net section, for
    heuristics options see the quorum.device.heuristics section. Pcs
    automatically creates TLS certificates and sets the 'tls' model option to
    the default value 'on'.
    Example: pcs quorum device add model net host=qnetd.internal.example.com
        algorithm=lms

Comment 11 John Ruemker 2018-06-04 14:47:57 UTC
Looks good.  

Thanks

Comment 12 Tomas Jelinek 2018-06-05 07:49:54 UTC
Created attachment 1447751 [details]
proposed fix

Comment 13 Ivan Devat 2018-06-22 12:11:42 UTC
After Fix:

[ant ~] $ rpm -q pcs pcs-snmp
pcs-0.9.165-1.el7.x86_64
pcs-snmp-0.9.165-1.el7.x86_64

[ant ~] $ pcs quorum device add -h|grep "Currently the only supported model "
        Currently the only supported model is 'net'. It requires model options

[ant ~] $ man pcs|grep "Currently the only supported model "
              Currently the only supported model is 'net'. It requires model options 'algorithm' and 'host' to be specified. Options are documented in corosync-qdevice(8) man page; generic options are 'sync_timeout' and 'timeout', for model net options check the quo‐

Comment 17 errata-xmlrpc 2018-10-30 08:05:31 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, 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-2018:3066


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