Bug 1003282 - [RHEVM-ENGINE] wrong error when updating host IP address using REST API
Summary: [RHEVM-ENGINE] wrong error when updating host IP address using REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Mooli Tayer
QA Contact: Tareq Alayan
URL:
Whiteboard: infra
Depends On:
Blocks: 3.3snap1
TreeView+ depends on / blocked
 
Reported: 2013-09-01 15:44 UTC by Barak Dagan
Modified: 2016-02-10 19:43 UTC (History)
9 users (show)

Fixed In Version: is19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 22:16:56 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine + cli logs (9.24 KB, application/x-compressed-tar)
2013-09-01 15:44 UTC, Barak Dagan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19749 0 None None None Never
oVirt gerrit 19932 0 None None None Never

Description Barak Dagan 2013-09-01 15:44:45 UTC
Created attachment 792612 [details]
engine + cli logs

Description of problem:
After an host is added, trying to edit it's IP address (when host is in maintenance mode) fails due to wrong error: 

[RHEVM shell]# update host MyHost --address IP-Addr

error: 
status: 409
reason: Conflict
detail: Cannot edit Host. Host parameters cannot be modified while Host is operational.
Please switch Host to Maintenance mode first

Version-Release number of selected component (if applicable):
is12

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
detail: Cannot edit Host. Host parameters cannot be modified while Host is operational.
Please switch Host to Maintenance mode first

Expected results:
detail: Cannot edit Host. parameter cannot be modified.

Additional info:

Comment 1 Mooli Tayer 2013-10-01 16:12:37 UTC
There is already an error message for this case: ACTION_TYPE_FAILED_HOSTNAME_CANNOT_CHANGE

It was not exposed due to a bug. Patch suggested on master.

Comment 2 Mooli Tayer 2013-10-01 16:21:17 UTC
just saw this is has flags exception & 3.3, changing to assigned.

Comment 4 Tareq Alayan 2013-10-29 22:10:36 UTC
Verified. tested on: 
rhevm-3.3.0-0.28.beta1.el6ev.noarch

[RHEVM shell (connected)]# update host rose04 --address 1.1.1.1

error: 
status: 400
reason: Bad Request
detail: Host Address can not be modified due to Security restrictions.  In order to change Host Address, Host has to be reinstalled

Comment 5 Barak Dagan 2013-10-30 10:20:24 UTC
According https://bugzilla.redhat.com/show_bug.cgi?id=1003281#c8
IP addrerss can be changed using API, but not from UI. So using UI related error message in REST, might not be the best solution.

Comment 6 Mooli Tayer 2013-10-30 11:40:59 UTC
I see. It is possible to implement it this way and might even be better according to bug 1003281, comment 8 and bug 1003281, comment 9. however currently the code contains a specific check to prevent this situation since ovirt git history began.

Comment 7 Itamar Heim 2014-01-21 22:16:56 UTC
Closing - RHEV 3.3 Released

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


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