| Summary: | pcs should tolerate trace_ra instance attribute silently accepted by ocf:{heartbeat,pacemaker} RAs | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Pokorný [poki] <jpokorny> | ||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 7.4 | CC: | cfeist, cluster-maint, idevat, omular, rsteiger, sbradley, tojeline | ||||
| Target Milestone: | rc | Flags: | jpokorny:
needinfo?
(rsteiger) |
||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| 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.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-01 18:24:40 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Jan Pokorný [poki]
2016-12-07 12:12:07 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. 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 |