Bug 1390071
Summary: | "pcs resource create" produces invalid cib on disallowed value of operation attribute | ||||||
---|---|---|---|---|---|---|---|
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, 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:
Command "pcs resource create" does not validate attributes of operation correctly.
Consequence:
Pcs produces invalid cib and ends with an error message. From the error message it is difficult to identify the cause.
Fix:
Command "pcs resource create" validate attributes of operation correctly.
Result:
Pcs ends with an error message that is helpful for the user.
|
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-31 07:43:07 UTC
Note that there are more op-attributes that suffers with a similar problem: > requires (should be one of: nothing quorum fencing unfencing) [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor requires=abc Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib.... > on-fail (should be one of: ignore block stop restart standby fence) [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor on-fail=abc Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib... > record-pending (should be boolean true or false) [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor record-pending=abc Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib... > enabled (should be boolean true or false) [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor enabled=abc Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib > start-delay and interval-origin can not appear together
[vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor start-delay=10 interval-origin=20
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib...
Created attachment 1246588 [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 role=abc Error: 'abc' is not a valid role value, use Master, Slave, Started, Stopped [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor role=abc --force Error: 'abc' is not a valid role value, use Master, Slave, Started, Stopped [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor requires=abc Error: 'abc' is not a valid requires value, use fencing, nothing, quorum, unfencing [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor requires=abc --force Error: 'abc' is not a valid requires value, use fencing, nothing, quorum, unfencing [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor on-fail=abc Error: 'abc' is not a valid on-fail value, use block, fence, ignore, restart, restart-container, standby, stop [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor on-fail=abc --force Error: 'abc' is not a valid on-fail value, use block, fence, ignore, restart, restart-container, standby, stop [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor record-pending=abc Error: 'abc' is not a valid record-pending value, use 0, 1, false, true [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor record-pending=abc --force Error: 'abc' is not a valid record-pending value, use 0, 1, false, true [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor enabled=abc Error: 'abc' is not a valid enabled value, use 0, 1, false, true [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitor enabled=abc --force Error: 'abc' is not a valid enabled value, use 0, 1, false, true 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 |