Bug 1325946

Summary: User is able to rename HostedEngine
Product: [oVirt] ovirt-engine Reporter: Lev Veyde <lveyde>
Component: BLL.HostedEngineAssignee: Jenny Tokar <jtokar>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.4.1CC: bugs, dfediuck, didi, lveyde, mavital, rgolan, sbonazzo, stirabos
Target Milestone: ovirt-3.6.6Flags: mavital: needinfo+
sbonazzo: ovirt-3.6.z?
rule-engine: planning_ack?
dfediuck: devel_ack+
rule-engine: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-19 06:53:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
engine.log none

Description Lev Veyde 2016-04-11 13:15:07 UTC
Description of problem:
User is able to change the name of the HostedEngine VM.
Even though a warning/error message is shown while trying to do so, the name is still changed, as can be seen in the DB by checking the vm_static table.

Version-Release number of selected component (if applicable):
oVirt 3.6.4.1-1.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. install HE w/ appliance
2. access the engine UI
3. add Storage Domain to make the HostedEngine VM visible in the engine
4. change the name of the HostedEngine VM to e.g. MyHostedEngine
5. access the engine DB and run a query against the vm_static table.
6. note that vm_name now shows the new name e.g. MyHostedEngine

Actual results:
The name of the VM changes.

Expected results:
The change should never happen.

Additional info:
I noticed that HE VM stopped responding sometime after the name was changed.

Comment 1 Yedidyah Bar David 2016-04-11 13:29:54 UTC
(In reply to Lev Veyde from comment #0)
> Expected results:
> The change should never happen.

Why?

If we have other places with this name hardcoded (and we do), that's a bug in these places.

Comment 2 Yedidyah Bar David 2016-04-11 13:33:05 UTC
There is an option in vdc_options 'HostedEngineVmName', we should just make sure it's kept up-to-date and read from it everywhere.

Comment 3 Sandro Bonazzola 2016-04-13 12:17:24 UTC
Lev can you please attach logs?

Comment 4 Lev Veyde 2016-04-13 13:53:09 UTC
Created attachment 1146856 [details]
engine.log

the HostedEngine was renamed to MyHostedEngine

Comment 5 Jenny Tokar 2016-04-18 15:03:38 UTC
This was fixed in the current version (was tested by me on 3.6.6). 
Please verify.

Comment 6 Roy Golan 2016-04-19 06:53:13 UTC
This bug is not listed under the 3.6.5 fixes so just closing on 3.6.6

Comment 7 Lev Veyde 2016-05-04 10:05:35 UTC
(In reply to Jenny Tokar from comment #5)
> This was fixed in the current version (was tested by me on 3.6.6). 
> Please verify.

I think it's for QA.

Comment 8 meital avital 2016-05-09 12:02:08 UTC
Verified on rhevm-3.6.6-0.1.el6.noarch

engine=# select vm_name from vm_static where vm_name = 'HostedEngine';
vm_name    
--------------
HostedEngine