Bug 1030500 - [osinfo] modify osinfo part to read both files in /etc/ovirt-engine/osinfo.conf.d and /usr/share/ovirt-engine/conf/osinfo-defaults.properties
[osinfo] modify osinfo part to read both files in /etc/ovirt-engine/osinfo.co...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.4.0
Assigned To: Roy Golan
Depends On:
  Show dependency treegraph
Reported: 2013-11-14 10:13 EST by Jiri Belka
Modified: 2014-02-28 04:45 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-28 04:45:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Belka 2013-11-14 10:13:27 EST
Description of problem:
modify osinfo part to read both files in /etc/ovirt-engine/osinfo.conf.d and /usr/share/ovirt-engine/conf/osinfo-defaults.properties

current symlink kung-fu is odd. it's a hack because current engine it cannot read osinfo-defaults.properties from /usr. README file is enough in /etc/ovirt-engine/osinfo.conf.d/. this would also prevent replacements of "wrong" modifications of 00-defaults.properties.

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

How reproducible:

Steps to Reproduce:
1. engine is not reading directly /usr/share/ovirt-engine/conf/osinfo-defaults.properties at all

Actual results:
engine reads osinfo defaults only because there's hacking symlink

Expected results:
read both user modified files and defaults from files shipped with product

Additional info:
no software should modify just like that anything in /etc. and this was the case. it's a ugly approach.
Comment 1 Jiri Belka 2013-11-14 10:15:13 EST
iirc redhat-support-plugin-rhev is more clever, it reads configs both from /etc and /usr :)
Comment 2 Michal Skrivanek 2013-11-19 10:21:47 EST
can you please clarify what you mean? stop by if you want:)
Comment 3 Jiri Belka 2013-12-04 04:21:46 EST
It should read both config files in /usr (it is not doing now) and /etc. It reads data from /usr by symlink hack now. If we would delete the symlink it should read data from /usr by itself.
Comment 4 Alon Bar-Lev 2013-12-11 08:39:48 EST

defaults of osinfo should read only /usr/share.

if user wishes to provide its own file, he should install new osinfo configuration file redirect to where ever his file is.

we should provide upgrade to remove /etc/ovirt-engine/sysprep files if they are default and to whatever left to generate osinfo configuration file to make use of user's custom files.

Comment 5 Alon Bar-Lev 2013-12-11 08:54:13 EST
Also, please add ${xxx} syntax to pull xxx out of EngineLocalConfig::getProperty() so that we can add ${ENGINE_ETC} or ${ENGINE_DATA} or even user defined variable at /etc/ovirt-engine/engine.conf,d/xxx.conf
Comment 6 Alon Bar-Lev 2013-12-14 17:49:54 EST
sorry, I hijacked a bug... as was referred to at other subject, please ignore comment#3, comment#5.
Comment 7 Alon Bar-Lev 2013-12-14 17:51:22 EST
For the subject at hand.

I reject the idea to read both location, I find that one symlink of default makes it easier to understand what actually is being used without knowing product internals.

If for some reason someone is to force that to be "fixed" the defaults file should be read before /etc processing.
Comment 8 Michal Skrivanek 2014-02-28 04:45:47 EST
(In reply to Alon Bar-Lev from comment #7)
I concur

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