Bug 890469
| Summary: | ovirt-engine-backend: incomplete error when trying to add host with wrong cluster ID [TEXT] | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> | ||||
| Component: | ovirt-engine | Assignee: | Ravi Nori <rnori> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Oded Ramraz <oramraz> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.2.0 | CC: | bazulay, dyasny, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.2.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | infra | ||||||
| Fixed In Version: | sf16 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | Type: | Bug | |||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 915537, 948448 | ||||||
| Attachments: |
|
||||||
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
[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 3.2 has been released 3.2 has been released |
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.