Bug 1379250 - [TEXT] - A comment to vm.conf of the hosted engine
Summary: [TEXT] - A comment to vm.conf of the hosted engine
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-ha
Classification: oVirt
Component: Agent
Version: 2.0.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-4.2.0
: 2.2.0
Assignee: Ido Rosenzwig
QA Contact: Nikolai Sednev
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-26 08:13 UTC by Simone Tiraboschi
Modified: 2017-12-20 10:41 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-20 10:41:44 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 75123 0 master MERGED env: Added a comment to vm.conf when refreshed 2017-04-04 20:20:32 UTC

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.


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