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
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.
verified on rhevm-cli-3.3.0.13-1.el6ev.noarch
Closing - RHEV 3.3 Released