Description of problem: Incomplete error when trying to add host with wrong cluster ID using rhevm-shell : " Cannot ${action} ${type}. Cluster ID is not valid., - General command validation failure." ${action} ${type} need to be replaced with actual actions. the "., -" in the end of the sentence is not accurate as well , this is probably general problem for can do action errors. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Try to add cluster with wrong cluster ID using CLI / Rest 2. 3. Actual results: Expected results: Additional info: [RHEVM shell (connected)]# list clusters id : 99408929-82cf-4dc7-a532-9d998063fa95 name : Default description: The default server cluster id : 300664d6-d0a6-4065-95ab-e1c43a484384 name : test [RHEVM shell (connected)]# add host --cluster-id 99408929-82cf-4dc7-a532-9d998063fa97 --name oded --root_password secret --address 10.1.1.1 error: syntax error [RHEVM shell (connected)]# add host --cluster-id 99408929-82cf-4dc7-a532-9d998063fa97 --name oded --root_password secret --address "10.1.1.1" error: status: 400 reason: Bad Request detail: Cannot ${action} ${type}. Cluster ID is not valid., - General command validation failure.
link : http://gerrit.ovirt.org/#/c/10586/ change id : I65f35c1fda1e36e6b05735424297c1f81d920553 This patch fixes the format of the error message from "., -" to "., " The dynamic variables are being properly substituted with the values in the current code base. Works for me.
[RHEVM shell (connected)]# add host --cluster-id 300664d6-d0a6-4065-95ab-e1c43a484389 --name test --address "10.10.10.10" --root_password "123456" error: status: 400 reason: Bad Request detail: Cannot add Host. Cluster ID is not valid., General command validation failure. The first error is fine : "Cannot add Host. Cluster ID is not valid". I don't see why the second part: ", General command validation failure." is needed . sf13.1
Can you please provide logs - From what I saw at the code , something bad has occurred during canDoAction - a RuntimeException is thrown, and this "General command validation failure" message was added.
I reproduced the issue again and attached the engine logs : [RHEVM shell (connected)]# add host --name oded --cluster-id "60fb9cb7-4945-417a-9f68-e7cbb141e4c7" --address "10.10.10.10" --root_password "123456" error: status: 400 reason: Bad Request detail: Cannot add Host. Cluster ID is not valid., General command validation failure.
Created attachment 736838 [details] engine logs
https://gerrit.eng.lab.tlv.redhat.com/gitweb?p=ovirt-engine.git;a=commit;h=60b46fd3687dee41cdb12688253ff6c66e279500
[RHEVM shell (connected)]# add host --name oded --cluster-id "60fb9cb7-4945-417a-9f68-e7cbb141e4c7" --address "10.10.10.10" --root_password "123456" error: status: 400 reason: Bad Request detail: Cannot add Host. Cluster ID is not valid. Verified sf17
3.2 has been released