Bug 1402374 - pcs should tolerate trace_ra instance attribute silently accepted by ocf:{heartbeat,pacemaker} RAs [NEEDINFO]
Summary: pcs should tolerate trace_ra instance attribute silently accepted by ocf:{hea...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
Depends On:
TreeView+ depends on / blocked
Reported: 2016-12-07 12:12 UTC by Jan Pokorný [poki]
Modified: 2018-09-27 17:29 UTC (History)
7 users (show)

Fixed In Version: pcs-0.9.157-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: The user sets the trace_ra and trace_file resource options. Consequence: Pcs exits with an error message saying the options are not defined for the resource and the user should use the --force flag to set them. Fix: Add the trace_ra and trace_file options to allowed options. Result: The user is able to set the trace_ra and trace_file options without using the --force flag.
Clone Of:
Last Closed: 2017-08-01 18:24:40 UTC
Target Upstream Version:
jpokorny: needinfo? (rsteiger)

Attachments (Terms of Use)
proposed fix (20.80 KB, patch)
2017-03-01 16:49 UTC, Tomas Jelinek
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3182931 0 None None None 2018-09-27 17:29:21 UTC
Red Hat Product Errata RHBA-2017:1958 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2017-08-01 18:09:47 UTC

Description Jan Pokorný [poki] 2016-12-07 12:12:07 UTC
The attribute in question is supported since 3.9.5 release of
resource agents:


meaning the support is present in RHEL 6.6+ and 7.0+.


# pcs resource create mydummy3 ocf:heartbeat:Dummy trace_ra=1
> Error: resource option(s): 'trace_ra', are not recognized for
> resource type: 'ocf:heartbeat:Dummy' (use --force to override)

Comment 2 Tomas Jelinek 2016-12-12 14:53:23 UTC
Note the attribute is called OCF_RESKEY_trace_ra in resource agents sources (see http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_open_cluster_framework for details)

It looks like the best thing to do is to add the trace_ra attribute to resource agent attributes after reading them from metadata. We only want to do this for ocf:pacemaker and ocf:heartbeat agents and only if the trace_ra is not defined in metadata already.

Comment 4 Tomas Jelinek 2017-03-01 16:49:00 UTC
Created attachment 1258825 [details]
proposed fix

Tests are included in the patch.

Comment 5 Ivan Devat 2017-04-10 15:52:51 UTC
After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs

[vm-rhel72-1 ~] $ pcs resource create --no-default-ops R ocf:heartbeat:Dummy trace_ra=1 trace_file=/root/trace
[vm-rhel72-1 ~] $ pcs cluster cib|grep '<primitive.*id="R"' -A8
      <primitive class="ocf" id="R" provider="heartbeat" type="Dummy">
        <instance_attributes id="R-instance_attributes">
          <nvpair id="R-instance_attributes-trace_file" name="trace_file" value="/root/trace"/>
          <nvpair id="R-instance_attributes-trace_ra" name="trace_ra" value="1"/>
          <op id="R-monitor-interval-10" interval="10" name="monitor" timeout="20"/>

Comment 10 errata-xmlrpc 2017-08-01 18:24:40 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.


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