Hide Forgot
The attribute in question is supported since 3.9.5 release of resource agents: http://lists.linux-ha.org/pipermail/linux-ha/2013-February/046461.html https://github.com/ClusterLabs/resource-agents/commit/e77e007dd3f30aba87cd7ddee62a7360a36ddd36#diff-deef7019e28edd811e858a1d7283095bR759 meaning the support is present in RHEL 6.6+ and 7.0+. Currently: # 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)
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.
Created attachment 1258825 [details] proposed fix Tests are included in the patch.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.157-1.el7.x86_64 [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"/> </instance_attributes> <operations> <op id="R-monitor-interval-10" interval="10" name="monitor" timeout="20"/> </operations> </primitive>
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-2017:1958