Description of problem: While creating nginx resource, a cib is dumped with error message: Error: Unable to update cib Call cib_apply_diff failed (-203): Update does not conform to the configured schema Version-Release number of selected component (if applicable): pcs-0.10.10-1.el8 How reproducible: always Steps to Reproduce: pcs resource create nginx ocf:heartbeat:nginx Actual results: error + cib dump Expected results: resource is created Additional info:
Looks like the addition of a depth attribute to the <op> element in the CIB diff causes a schema violation. E.g., <op depth="10" id="nginx-monitor-interval-30s" interval="30s" name="monitor" timeout="30s"> <instance_attributes id="nginx-monitor-interval-30s-instance_attributes"> <nvpair id="nginx-monitor-interval-30s-instance_attributes-OCF_CHECK_LEVEL" name="OCF_CHECK_LEVEL" value="10"/> </instance_attributes> </op> pcs-0.10.8-1's diff looks like this for the same op: <op id="nginx-monitor-interval-30s" interval="30s" name="monitor" timeout="30s"> <instance_attributes id="nginx-monitor-interval-30s-instance_attributes"> <nvpair id="nginx-monitor-interval-30s-instance_attributes-OCF_CHECK_LEVEL" name="OCF_CHECK_LEVEL" value="10"/> </instance_attributes> </op> If I remove depth from the diff on 0.10.10-1, the cib_apply_diff works fine.
I think this might fix it? In Agent.get_actions(): Before: dc_replace(action, OCF_CHECK_LEVEL=action.depth) After: dc_replace(action, depth=None, OCF_CHECK_LEVEL=action.depth)
Never mind :) saw https://github.com/ClusterLabs/pcs/pull/366
Created attachment 1818301 [details] proposed fix See comment 0 for a test.
DevTestResults: [root@r8-node-01 ~]# rpm -q pcs pcs-0.10.10-2.el8.x86_64 [root@r8-node-01 ~]# pcs resource create nginx ocf:heartbeat:nginx Warning: changing a monitor operation interval from 60s to 61 to make the operation unique [root@r8-node-01 ~]# echo $? 0
BEFORE: ======= [root@virt-132 ~]# rpm -q pcs pcs-0.10.10-1.el8.x86_64 [root@virt-132 ~]# pcs resource create nginx ocf:heartbeat:nginx Warning: changing a monitor operation interval from 60s to 61 to make the operation unique Error: Unable to update cib Call cib_apply_diff failed (-203): Update does not conform to the configured schema {cib output} [root@virt-132 ~]# echo $? 1 AFTER: ====== [root@virt-024 ~]# rpm -q pcs pcs-0.10.10-2.el8.x86_64 [root@virt-024 ~]# pcs resource create nginx ocf:heartbeat:nginx Warning: changing a monitor operation interval from 60s to 61 to make the operation unique [root@virt-024 ~]# echo $? 0 [root@virt-024 ~]# pcs resource * nginx (ocf::heartbeat:nginx): Stopped > OK Regression tests will be conducted as part of bz1935594. Marking as Verified in pcs-0.10.10-2.el8
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 (Low: pcs security, bug fix, and enhancement update), 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/RHSA-2021:4142