Bug 890469 - ovirt-engine-backend: incomplete error when trying to add host with wrong cluster ID [TEXT]
ovirt-engine-backend: incomplete error when trying to add host with wrong clu...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.2.0
Assigned To: Ravi Nori
Oded Ramraz
infra
:
Depends On:
Blocks: 915537 948448
  Show dependency treegraph
 
Reported: 2012-12-27 02:14 EST by Oded Ramraz
Modified: 2016-02-10 14:00 EST (History)
9 users (show)

See Also:
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: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 13992 None None None Never
oVirt gerrit 13995 None None None Never

  None (edit)
Description Oded Ramraz 2012-12-27 02:14:39 EST
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 15:27:57 EST
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 08:04:46 EDT
[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 08:45:06 EDT
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 09:12:30 EDT
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 09:13:28 EDT
Created attachment 736838 [details]
engine logs
Comment 10 Oded Ramraz 2013-05-16 13:34:15 EDT
[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 05:36:57 EDT
3.2 has been released
Comment 12 Itamar Heim 2013-06-11 05:37:01 EDT
3.2 has been released
Comment 13 Itamar Heim 2013-06-11 05:51:31 EDT
3.2 has been released

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