Bug 890469 - ovirt-engine-backend: incomplete error when trying to add host with wrong cluster ID [TEXT]
Summary: ovirt-engine-backend: incomplete error when trying to add host with wrong clu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.2.0
Assignee: Ravi Nori
QA Contact: Oded Ramraz
URL:
Whiteboard: infra
Depends On:
Blocks: 915537 948448
TreeView+ depends on / blocked
 
Reported: 2012-12-27 07:14 UTC by Oded Ramraz
Modified: 2016-02-10 19:00 UTC (History)
9 users (show)

Fixed In Version: sf16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine logs (52.08 KB, application/zip)
2013-04-17 13:13 UTC, Oded Ramraz
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 13992 0 None None None Never
oVirt gerrit 13995 0 None None None Never

Description Oded Ramraz 2012-12-27 07:14:39 UTC
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.

Comment 1 Ravi Nori 2013-01-02 20:27:57 UTC
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.

Comment 3 Oded Ramraz 2013-04-14 12:04:46 UTC
[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

Comment 4 Yair Zaslavsky 2013-04-17 12:45:06 UTC
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.

Comment 5 Oded Ramraz 2013-04-17 13:12:30 UTC
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.

Comment 6 Oded Ramraz 2013-04-17 13:13:28 UTC
Created attachment 736838 [details]
engine logs

Comment 10 Oded Ramraz 2013-05-16 17:34:15 UTC
[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

Comment 11 Itamar Heim 2013-06-11 09:36:57 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 09:37:01 UTC
3.2 has been released

Comment 13 Itamar Heim 2013-06-11 09:51:31 UTC
3.2 has been released


Note You need to log in before you can comment on or make changes to this bug.