Bug 1003282 - [RHEVM-ENGINE] wrong error when updating host IP address using REST API
[RHEVM-ENGINE] wrong error when updating host IP address using REST API
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Mooli Tayer
Tareq Alayan
infra
: Triaged
Depends On:
Blocks: 3.3snap1
  Show dependency treegraph
 
Reported: 2013-09-01 11:44 EDT by Barak Dagan
Modified: 2016-02-10 14:43 EST (History)
9 users (show)

See Also:
Fixed In Version: is19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 17:16:56 EST
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 + cli logs (9.24 KB, application/x-compressed-tar)
2013-09-01 11:44 EDT, Barak Dagan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19749 None None None Never
oVirt gerrit 19932 None None None Never

  None (edit)
Description Barak Dagan 2013-09-01 11:44:45 EDT
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 12:12:37 EDT
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 12:21:17 EDT
just saw this is has flags exception & 3.3, changing to assigned.
Comment 4 Tareq Alayan 2013-10-29 18:10:36 EDT
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 06:20:24 EDT
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 07:40:59 EDT
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 17:16:56 EST
Closing - RHEV 3.3 Released
Comment 8 Itamar Heim 2014-01-21 17:23:35 EST
Closing - RHEV 3.3 Released

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