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 1748805 - [man/help] incorrect wording in documentation of crm_resource RA parameter validation
Summary: [man/help] incorrect wording in documentation of crm_resource RA parameter va...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pacemaker
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: pre-dev-freeze
: 8.2
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1752538
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-04 08:19 UTC by Patrik Hagara
Modified: 2020-04-28 15:39 UTC (History)
2 users (show)

Fixed In Version: pacemaker-2.0.3-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:38:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:1609 0 None None None 2020-04-28 15:39:10 UTC

Description Patrik Hagara 2019-09-04 08:19:35 UTC
This bug was initially created as a copy of Bug #1637020

(In reply to Ken Gaillot from comment #9)
> (In reply to Patrik Hagara from comment #7)
> <snip>
> > > [root@virt-042 ~]# crm_resource --help
> > [...]
> > >      --validate		Call the validate-all action.  There are two different things that can be validated.  One
> > > 				method is to validate the resource given by the -r option.  The other method is to validate
> > > 				a not-yet-existing resource.  This method requires the --class, --agent, and --provider
> > > 				arguments, plus at least one --option argument.
> > [...]
> > 
> > * option present in manual page:
> > 
> > > [root@virt-042 ~]# man crm_resource
> > [...]
> > >    Commands:
> > >        --validate
> > >               Call  the  validate-all  action.   There  are  two  different  things  that can be validated.  One method is to validate the resource given by the -r option.  The other method is to validate a
> > >               not-yet-existing resource.  This method requires the --class, --agent, and --provider arguments, plus at least one --option argument.
> > [...]
> 
> These should say something like "and may take any number of --option
> arguments"
> 
> <snip>
> 
> > Issue #1: Is there any technical reason for having these 3 separate options
> > instead of using the pcs-esque syntax (ie. a single
> > "<class>:<provider>:<agent>" string, passed to eg. the "--agent" option
> > while getting rid of the others)? It really seems like a bad decision to me,
> > UX-wise.
> 
> Good point -- no, but it's already been released upstream, so it has to be
> kept for backward compatibility. I suppose we could accept either style. In
> any case, it's intended more for pcs to call rather than end users, so it
> won't really affect anyone.
>  
> > * validate not-yet-existing resource, no --option used:
> > 
> > > [root@virt-042 ~]# crm_resource --validate --class ocf --provider heartbeat --agent Delay
> > > Operation validate-all for test (ocf:heartbeat:Delay) returned: 'ok' (0)
> > > [root@virt-042 ~]# echo $?
> > > 0
> > 
> > Issue #2: Notice how the help text and manual page lie about the requirement
> > for --option usage.
> 
> as mentioned above
>  
> > * validate not-yet-existing resource, option name unknown to RA:
> > 
> > > [root@virt-042 ~]# crm_resource --validate --class ocf --provider heartbeat --agent Delay --option foodelay=2
> > > Operation validate-all for test (ocf:heartbeat:Delay) returned: 'ok' (0)
> > > [root@virt-042 ~]# echo $?
> > > 0
> > 
> > Issue #3: crm_resource reports 'ok' and successful exit code, even though an
> > option name unknown to the resource agent is used. If administrator decides
> > to actually create a resource with such option, an error is (correctly)
> > raised:
> > 
> > > [root@virt-042 ~]# pcs resource create foodelay ocf:heartbeat:Delay foodelay=1
> > > Error: invalid resource option 'foodelay', allowed options are: 'mondelay', 'startdelay', 'stopdelay', 'trace_file', 'trace_ra', use --force to override
> > 
> > I see no reason to ever use --force in the above command, and consequently
> > for crm_resource --validate to return success in such a situation.
> 
> This is actually an artifact of how the different components interact. pcs
> is the one enforcing the allowed options, not pacemaker or the resource
> agent -- so calling crm_resource directly skips that. When pcs implements
> its interface to this capability, it should do the same enforcement there.
> 
> It would also be possible for resource agents to make their validate action
> fail if given unrecognized parameters, but at this point, no resource agent
> does.
>  
> It's probably too late to get a new build just to update the help/man text,
> so we can open a separate BZ for that.

Comment 1 Patrik Hagara 2019-09-30 17:03:35 UTC
qa_ack+, simple manual page text change

Comment 2 Ken Gaillot 2019-10-02 00:21:27 UTC
Fixed upstream by commit 6427bda4

New help text:

     --validate			Validate resource configuration by calling agent's validate-all action.
				The configuration may be specified either by giving an existing
				resource name with -r, or by specifying --class, --agent, and
				--provider arguments, along with any number of --option arguments.

Comment 4 Markéta Smazová 2020-01-15 17:54:24 UTC
Before fix
    [root@virt-029 ~]# rpm -q pacemaker
    pacemaker-2.0.2-3.el8_1.2.x86_64

The current wording of man/help:

    [root@virt-029 ~]# crm_resource --help
    [...]

    --validate			Call the validate-all action.  There are two different things that can be validated.  One
				    method is to validate the resource given by the -r option.  The other method is to validate
				    a not-yet-existing resource.  This method requires the --class, --agent, and --provider
				    arguments, plus at least one --option argument.
				    
    [...]

    [root@virt-026 ~]# man crm_resource
    [...]
    Commands:
           --validate
                  Call the validate-all action.  There are two different things that can be validated.  One method is to  validate  the
                  resource  given by the -r option.  The other method is to validate a not-yet-existing resource.  This method requires
                  the --class, --agent, and --provider arguments, plus at least one --option argument.
    [...]


There is an incorrect wording in the last sentence: "This method requires the --class, --agent, and --provider arguments, plus at least one --option argument."


After fix
    [root@virt-024 ~]# rpm -q pacemaker
    pacemaker-2.0.3-3.el8.x86_64

The current wording of man/help:

    [root@virt-024 ~]# crm_resource --help
    [...]
    Commands:
         --validate			Validate resource configuration by calling agent's validate-all action.
				    The configuration may be specified either by giving an existing
				    resource name with -r, or by specifying --class, --agent, and
				    --provider arguments, along with any number of --option arguments.

    [...]

    [root@virt-024 ~]# man crm_resource
    [...]
    Commands:
           --validate
                  Validate resource configuration by calling agent's validate-all action.  The configu‐
                  ration may be specified either by giving an existing resource name  with  -r,  or  by
                  specifying  --class,  --agent,  and  --provider  arguments,  along with any number of
                  --option arguments.
    [...]
              
The wording in the documentation has been corrected. Now it matches with comment#2.

Comment 6 errata-xmlrpc 2020-04-28 15:38:28 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/RHEA-2020:1609


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