Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1379250

Summary: [TEXT] - A comment to vm.conf of the hosted engine
Product: [oVirt] ovirt-hosted-engine-ha Reporter: Simone Tiraboschi <stirabos>
Component: AgentAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: low Docs Contact:
Priority: low    
Version: 2.0.4CC: bugs, rgolan, ylavi
Target Milestone: ovirt-4.2.0Keywords: Triaged
Target Release: 2.2.0Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:41:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Simone Tiraboschi 2016-09-26 08:13:51 UTC
Description of problem:
ovirt-ha-agent extracts the engine VM configuration from the shared storage to /var/run/ovirt-hosted-engine-ha/vm.conf
Since the file could be easily found on the local FS, an user can try editing it 
in order to tweak the engine VM configuration but this will lead to no results since that file is reverted from the shared storage when needed and so any user modification will be overwritten.
A possible solution is to use a random filename for the temporary local copy of vm.conf.
Since it will be not that easy to find it; it will be also necessary to add another CLI option to extract vm.conf to the stdout for troubleshooting activities (we already have an option to boot the engine vm from a custom vm.conf).


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

How reproducible:
100%


Steps to Reproduce:
1. deploy hosted-engine
2.
3.

Actual results:
The local copy of vm.conf for the engine VM is periodically extracted to /var/run/ovirt-hosted-engine-ha/vm.conf

Expected results:
The local copy of vm.conf for the engine VM is periodically extracted to a file with a random name.
There is an additional CLI option to let the user inspect vm.conf.

Additional info:

Comment 1 Martin Sivák 2016-09-26 09:28:56 UTC
I prefer to add a "do not edit" header to the file instead of obfuscating the name. All services with autogenerated config I know do it like that.

Comment 2 Roy Golan 2016-09-26 10:34:50 UTC
Agree with Martin. The files under /var/run are reflecting the current run and are not for configuration. A comment in the form Martin suggest should be enough.

Being randon simply doens't make sense as a solution to a problem that is sporadically reported.

Comment 3 Yaniv Lavi 2016-09-29 08:12:24 UTC
The file should have a comment clearly stating "Editing the hosted engine VM is only possible via the manager UI\API".

Comment 4 Nikolai Sednev 2017-09-18 14:30:43 UTC
On clean deployment of ovirt-hosted-engine-setup-2.2.0-0.0.master.20170913082146.git120d800.el7.centos.noarch with ovirt-engine-appliance-4.2-20170917.1.el7.centos.noarch, I see:

[root@alma03 ~]# ll -lsha /var/run/ovirt-hosted-engine-ha/
total 8.0K
   0 drwxr-xr-x.  2 vdsm kvm   100 Sep 18 17:23 .
   0 drwxr-xr-x. 42 root root 1.3K Sep 18 17:23 ..
   0 srwxr-xr-x.  1 vdsm kvm     0 Sep 18 17:23 broker.socket
4.0K -rw-------.  1 vdsm kvm  1.6K Sep 18 17:27 vm.conf
4.0K -rw-------.  1 vdsm kvm  1.5K Sep 18 17:19 vm.conf.20170918171932

When trying to edit I see on top of the file:
"# Editing the hosted engine VM is only possible via the manager UI\API"

Moving to verified.

Comment 5 Sandro Bonazzola 2017-12-20 10:41:44 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.