Hide Forgot
Description of problem: When the user enter an unknown operation (eg. when the user makes a typo) the "resource create" command silently accept it and put it into cib. How reproducible: always Steps to Reproduce: [vm-rhel72-1 ~] $ pcs resource create A ocf:heartbeat:Dummy op monitro interval=100 Actual results: No error and there is operation "monitro" in cib (while user expected "monitor"). Expected results: Error: invalid operation "monitro", valid operations are "monitor", "start", "stop", "promote", "demote" --use force to override [vm-rhel72-1 ~] $ pcs resource create A ocf:heartbeat:Dummy op monitro interval=100 --force Warning: invalid operation "monitro", valid operations are "monitor", "start", "stop", "promote", "demote"
http://lists.clusterlabs.org/pipermail/users/2017-January/004865.html
Created attachment 1246358 [details] proposed fix Tests are in the patch.
Created attachment 1246359 [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 monitro interval=100 Error: 'monitro' is not a valid operation name value, use meta-data, migrate_from, migrate_to, monitor, reload, start, stop, validate-all, use --force to override [vm-rhel72-1 ~] $ pcs resource create R ocf:heartbeat:Dummy op monitro interval=100 --force Warning: 'monitro' is not a valid operation name value, use meta-data, migrate_from, migrate_to, monitor, reload, start, stop, validate-all [vm-rhel72-1 ~] $ echo $? 0
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