Hide Forgot
Description of problem: "pcs stonith create" allows to force the use a "device type" that is not present in a system. It produces an invalid cib when there is a colon in a "device type". How reproducible: always Steps to Reproduce: [vm-rhel72-1 ~pcs] $ pcs stonith create F fence_xvm:whatever --force Actual results: Warning: Agent 'fence_xvm:whatever' not found Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib... Expected results: Error: 'fence_xvm:whatever' is not a valid stonith device type
Created attachment 1246746 [details] proposed fix (partial) The proposed fix solves the problem with the invalid cib. But the stonith resource with the agent name that contains ":" does not work - even if such agent exists. It is necessary to reject such name.
Created attachment 1265182 [details] proposed fix Test: [root@rh73-node1:~]# pcs stonith create aaa fence_xvm:test Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character. [root@rh73-node1:~]# pcs stonith create aaa fence_xvm:test --force Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.157-1.el7.x86_64 [vm-rhel72-1 ~] $ pcs stonith create aaa fence_xvm:test Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character. [vm-rhel72-1 ~] $ pcs stonith create aaa fence_xvm:test --force Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.
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