Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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".
Description of problem:
When unknown op-attribute is entered in the "pcs resource create", pcs suggests to use flag --force.
But the command with flag --force produces invalid cib.
How reproducible: always
Steps to Reproduce:
1.
[vm-rhel72-1 ~] $ pcs resource create dummy Dummy op monitor interval=1min a=b
Error: a is not a valid op option (use --force to override)
2.
[vm-rhel72-1 ~] $ pcs resource create dummy Dummy op monitor interval=1min a=b --force
Actual results:
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib...
[vm-rhel72-1 ~] $ echo $?
1
Expected results:
[vm-rhel72-1 ~] $ echo $?
0
[vm-rhel72-1 ~] $ pcs resource show dummy
Resource: dummy (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (dummy-start-interval-0s)
stop interval=0s timeout=20 (dummy-stop-interval-0s)
monitor interval=1min a=b (dummy-monitor-interval-1min)
Additional info:
The problem is that pcs put the attribute "a" to the "op" element as attribute. And it does not conform schema. Pcs could put the attribute "a" as instance attribute (in nvpair) of "op" element:
<op id="dummy-monitor-interval-1min" interval="1min" name="monitor">
<instance_attributes id="params-dummy-monitor-interval-1min">
<nvpair id="dummy-monitor-interval-1min-a" name="a" value="b"/>
</instance_attributes>
</op>
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.
Comment 8Jan Pokorný [poki]
2017-07-11 21:11:03 UTC
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
Description of problem: When unknown op-attribute is entered in the "pcs resource create", pcs suggests to use flag --force. But the command with flag --force produces invalid cib. How reproducible: always Steps to Reproduce: 1. [vm-rhel72-1 ~] $ pcs resource create dummy Dummy op monitor interval=1min a=b Error: a is not a valid op option (use --force to override) 2. [vm-rhel72-1 ~] $ pcs resource create dummy Dummy op monitor interval=1min a=b --force Actual results: Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib... [vm-rhel72-1 ~] $ echo $? 1 Expected results: [vm-rhel72-1 ~] $ echo $? 0 [vm-rhel72-1 ~] $ pcs resource show dummy Resource: dummy (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-start-interval-0s) stop interval=0s timeout=20 (dummy-stop-interval-0s) monitor interval=1min a=b (dummy-monitor-interval-1min) Additional info: The problem is that pcs put the attribute "a" to the "op" element as attribute. And it does not conform schema. Pcs could put the attribute "a" as instance attribute (in nvpair) of "op" element: <op id="dummy-monitor-interval-1min" interval="1min" name="monitor"> <instance_attributes id="params-dummy-monitor-interval-1min"> <nvpair id="dummy-monitor-interval-1min-a" name="a" value="b"/> </instance_attributes> </op>