Bug 1089093 - [RFE] Rework engine configuration
Summary: [RFE] Rework engine configuration
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Martin Perina
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-17 22:19 UTC by Alon Bar-Lev
Modified: 2019-04-28 13:10 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-08 05:26:54 UTC
oVirt Team: Infra
Embargoed:
oourfali: ovirt-future?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?


Attachments (Terms of Use)
convert.py (7.50 KB, text/x-python)
2014-04-17 22:19 UTC, Alon Bar-Lev
no flags Details

Description Alon Bar-Lev 2014-04-17 22:19:17 UTC
Created attachment 887348 [details]
convert.py

CURRENT IMPLEMENTATION

ConfigValues.java
1. single enumeration of all configuration values.
2. hardcoded defaults (if missing from vdc_options table).
3. java magic for indirect reference of configuration values (aka "behavior").

ConfigurationValues.java
1. UI exposed config values.
2. Rule management.

vdc_options table
1. columns: option_name, option_value, version
2. 'general' a special version for all versions, but if not provided explicit value per version is required.

engine-config.properties
1. holds configuration for the engine-config utilities.
2. contains description for config values, type.
3. contains input validation hint.

PROBLEMS IN CURRENT IMPLEMENTATION

Each introduction of new configuration option touches all the above files.

Each upgrade should override the database options, even if user had not modified the defaults.

It is very difficult to add misc internal configurations to override built-in constants, as the implication of adding these effect much larger scope (see above).

NEW IMPLEMENTATION

1. Store only non default values within vdc_options.

2. Support version override within vdc_options, so that the lookup will be first to specific version, and if absent checkout the general.

3. Provide defaults, types, validation hint within properties files, provided within the binary distribution (jar).

4. Codegen enum or simple constants out of the configuration defaults during build to allow type safe build.
a. there can be multiple properties file, maintainers should be able to choose location of configuration.
b. simple constants are easier to manage as we can generate class per property file without the need to aggregate.
c. the configuration subsystem should read the properties file, not use the codegen output.

5. Generate combined property files for engine-config usage.

6. Modify the engine-config utility:
a. use new property file format.
b. add option "revert to default", simply remove entries.
c. add option "drop unused" to drop all options that are not within the defaults.

7. Support program provided defaults, something like Config.get("MYCONFIG", default), so that developers can replace all internal constants with potentially configurable scheme.

Attached a prototype of conversion program to be run at devenv and generate the suggested new format of defaults out of existing sources.

BENEFIT IN NEW IMPLEMENTATION

No more database update when changing application's default.

Reduce the chance of sync lost between multiple artifacts that describes the same entity.

Reduce merge conflict when competing on same files.

Support developer's defaults override, enable easier support.

Comment 1 Itamar Heim 2015-03-29 09:05:42 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.

Comment 2 Red Hat Bugzilla Rules Engine 2015-10-19 11:00:31 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 4 Oved Ourfali 2016-01-27 07:07:23 UTC
Martin - moved to you.
We'll consider that (or other configuration changes) for 4.0.

Comment 5 Yaniv Kaul 2016-03-02 18:10:01 UTC
(In reply to Oved Ourfali from comment #4)
> Martin - moved to you.
> We'll consider that (or other configuration changes) for 4.0.

Time to decide. I'm for moving it from 4.0 (and in fact, closing with WONTFIX).

Comment 6 Oved Ourfali 2016-03-03 06:38:59 UTC
I'll push that to ovirt-future, as we should consider changing the configuration in future versions.

Comment 7 Yaniv Kaul 2017-06-07 17:13:08 UTC
Roy, please add your idea to this and let's decide if we wish to pursue this or close-defer.

Comment 8 Oved Ourfali 2017-06-08 05:26:54 UTC
(In reply to Yaniv Kaul from comment #7)
> Roy, please add your idea to this and let's decide if we wish to pursue this
> or close-defer.

We aren't going to re-open the configuration at this point.
We can consider improving/changing/re-implementing it in KubeVirt.


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