Bug 1030500

Summary: [osinfo] modify osinfo part to read both files in /etc/ovirt-engine/osinfo.conf.d and /usr/share/ovirt-engine/conf/osinfo-defaults.properties
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, alonbl, iheim, jbelka, lpeer, michal.skrivanek, Rhev-m-bugs, sbonazzo, sherold, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-28 09:45:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Belka 2013-11-14 15:13:27 UTC
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):
is23

How reproducible:
100%

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

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 15:15:13 UTC
iirc redhat-support-plugin-rhev is more clever, it reads configs both from /etc and /usr :)

Comment 2 Michal Skrivanek 2013-11-19 15:21:47 UTC
can you please clarify what you mean? stop by if you want:)

Comment 3 Jiri Belka 2013-12-04 09:21:46 UTC
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 13:39:48 UTC
Hi,

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.

Thanks,

Comment 5 Alon Bar-Lev 2013-12-11 13:54:13 UTC
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 22:49:54 UTC
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 22:51:22 UTC
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 09:45:47 UTC
(In reply to Alon Bar-Lev from comment #7)
I concur