Bug 1046336 - [REST-API] misleading error message, for moving hosts between clusters
Summary: [REST-API] misleading error message, for moving hosts between clusters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Juan Hernández
QA Contact: Tareq Alayan
URL:
Whiteboard: infra
Depends On:
Blocks: rhev3.3ga
TreeView+ depends on / blocked
 
Reported: 2013-12-24 15:34 UTC by Barak Dagan
Modified: 2016-02-10 19:23 UTC (History)
9 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 22739 0 None None None Never
oVirt gerrit 22747 0 None None None Never

Description Barak Dagan 2013-12-24 15:34:03 UTC
Description of problem:
When moving host between cluster using "update host ... cluster-name ...", there is an error message required using a different method (change host cluster action).
1) Couldn't find that method as primary or under action & update as secondary action.
2) The host's moved to the new cluster.

Version-Release number of selected component (if applicable):
is28.1:
sdk version    : 3.3.0.21.*final-.1
cli version    : 3.3.0.12.*final-.1
python version : 2.6.6.final.0

How reproducible:
100%

Steps to Reproduce:
1. Create 2 DC, containing 1 cluster each.
2. Add host to one of the clusters
3. update host with the 2nd cluster name

Actual results:
error message while action successedd

Expected results:


Additional info:

[RHEVM shell (connected@localhost)]# list clusters

id         : 60f782e4-f7d8-48e8-ae62-9757d4254c04
name       : CL10

id         : 7cf98041-201e-4553-a4d7-527ad1f2b5a6
name       : cl_t

id         : 99408929-82cf-4dc7-a532-9d998063fa95
name       : Default
description: The default server cluster

[RHEVM shell (connected@localhost)]# show host MyHost | grep cluster
cluster-id                        : 60f782e4-f7d8-48e8-ae62-9757d4254c04
[RHEVM shell (connected@localhost)]# update host MyHost --cluster-name cl_t 

error: 
status: 400
reason: Bad Request
detail: Updating Host's Cluster cannot be performed through update Host action, please use Change Host Cluster action instead.

[RHEVM shell (connected@localhost)]# show host MyHost | grep cluster
cluster-id                        : 7cf98041-201e-4553-a4d7-527ad1f2b5a6

Comment 1 Juan Hernández 2013-12-25 15:11:07 UTC
The problem we have here is that we load the host entity before changing the cluster, then we change the cluster with the ChangeVDSCluster command and then we change the rest of the parameters with the UpdateVds command. But we load the host entity before the first command and pass it to the second, so the second command sees the old cluster id and explicitly refuses to perform the second part of the update (the first part, changing the cluster, has already been performed).

I think that we can fix this with the proposed patch, but I believe that this logic doesn't belong in the API, it should be part of the backend.

Comment 3 Tareq Alayan 2014-01-05 10:34:38 UTC
verified on rhevm-cli-3.3.0.13-1.el6ev.noarch

Comment 4 Itamar Heim 2014-01-21 22:23:35 UTC
Closing - RHEV 3.3 Released

Comment 5 Itamar Heim 2014-01-21 22:24:38 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:28:17 UTC
Closing - RHEV 3.3 Released


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