Hide Forgot
Description of problem: "pcs resource create" allows force the use a resource agent class that is not specified in the schema. Such command produces invalid cib. Steps to Reproduce: [vm-rhel72-1 ~pcs] $ pcs resource create R invalid:heartbeat:Dummy --force Actual results: Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib... Expected results: Error: 'invalid' is not valid resource agent class.
Note that check only resource agent class is not enough. t is necessary to deal with a RA (resource agent) provider in dependency on value of RA class. The following commands produces invalid cib as well: [vm-rhel72-1 ~pcs] $ pcs resource create R ocf:Dummy --force [vm-rhel72-1 ~pcs] $ pcs resource create R2 lsb:heartbeat:Dummy --force Class ocf requires provider while other class do not.
Created attachment 1246649 [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 invalid:Dummy Error: Invalid resource agent name 'invalid:Dummy'. Use standard:provider:type when standard is 'ocf' or standard:type otherwise. List of standards and providers can be obtained by using commands 'pcs resource standards' and 'pcs resource providers' [vm-rhel72-1 ~] $ pcs resource create R ocf:Dummy Error: Invalid resource agent name 'ocf:Dummy'. Use standard:provider:type when standard is 'ocf' or standard:type otherwise. List of standards and providers can be obtained by using commands 'pcs resource standards' and 'pcs resource providers' [vm-rhel72-1 ~] $ pcs resource create R lsb:provider:Dummy Error: Invalid resource agent name 'lsb:provider:Dummy'. Use standard:provider:type when standard is 'ocf' or standard:type otherwise. List of standards and providers can be obtained by using commands 'pcs resource standards' and 'pcs resource providers'
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