Bug 1382597
Summary: | "pcs resource create" produces invalid cib when the use of unknown op attribute is forced | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ivan Devat <idevat> | ||||
Component: | pcs | Assignee: | Ivan Devat <idevat> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.2 | CC: | cfeist, cluster-maint, idevat, jpokorny, omular, rsteiger, tojeline | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.9.156-1.el7 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
Pcs allows the user to enforce invalid attribute of resource operation in "pcs resource create".
Consequence:
Pcs produces invalid cib ends with an error message. From the error message it is difficult to identify the cause.
Fix:
Pcs does not allow the user to enforce invalid attribute of resource operation in "pcs resource create".
Result:
It is not possible to enforce invalid attribute of resource operation in "pcs resource create".
|
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: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ivan Devat
2016-10-07 06:49:38 UTC
Putting invalid attributes into "instance_attributes" of "op" is not a good idea. Currently there is no syntax to distinguish between attributes of "op" and "instance_attributes" of "op". Currently in "pcs resource create" it is not possible to specify "instance_attributes" of "op". The only exception is OCF_CHECK_LEVEL (alias "depth") which is always put in "instance_attributes" of "op". Because of this we are not going to allow to specify "instance_attributes" of "op" for now. Created attachment 1246366 [details]
proposed fix
Tests are in the patch.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.156-1.el7.x86_64 [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor interval=1min a=b Error: invalid resource operation option 'a', allowed options are: OCF_CHECK_LEVEL, description, enabled, id, interval, interval-origin, name, on-fail, record-pending, requires, role, start-delay, timeout [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor interval=1min a=b --force Error: invalid resource operation option 'a', allowed options are: OCF_CHECK_LEVEL, description, enabled, id, interval, interval-origin, name, on-fail, record-pending, requires, role, start-delay, timeout re [comment ]: > Putting invalid attributes into "instance_attributes" of "op" is not > a good idea. Currently there is no syntax to distinguish between > attributes of "op" and "instance_attributes" of "op". Probably should have been discussed in wider circles :-/ See [bug 1469801]. 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 |