Bug 1598447 - Provide a tool to find changed config values
Summary: Provide a tool to find changed config values
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Tools.Config
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.8
: ---
Assignee: Benny Zlotnik
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-05 13:46 UTC by Benny Zlotnik
Modified: 2019-01-22 10:23 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.2.8.1
Doc Type: Enhancement
Doc Text:
Feature: In previous versions there was no easy way how administrators could found out, which changes they have made to options exposed via engine-config tool, which could cause them issues after performing y-stream upgrades (for example 4.1 -> 4.2). Reason: Result: We have added option -d/--diff to engine-config tool which will display administrators all differences between their current option values and default value provided by engine. The differences are displayed using following format: $ engine-config --diff Name: vdsConnectionTimeout Version: general Current: 40 Default: 20
Clone Of:
Environment:
Last Closed: 2019-01-22 10:23:29 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 92842 0 master ABANDONED WIP tools: introduce config-diff 2020-07-10 12:09:35 UTC
oVirt gerrit 94162 0 master MERGED tools: add -d option to engine-config 2020-07-10 12:09:36 UTC
oVirt gerrit 95038 0 master MERGED setup: Use PSQL functions to modify vdc_options 2020-07-10 12:09:35 UTC
oVirt gerrit 95039 0 master MERGED core: Fix default value for VdsLocalDisksLowFreeSpace 2020-07-10 12:09:35 UTC
oVirt gerrit 95047 0 master MERGED core: Fix default value of MaxNumOfCpuPerSocket for 3.6/4.0 2020-07-10 12:09:35 UTC
oVirt gerrit 95081 0 ovirt-engine-4.2 MERGED setup: Use PSQL functions to modify vdc_options 2020-07-10 12:09:35 UTC
oVirt gerrit 95082 0 ovirt-engine-4.2 MERGED core: Fix default value for VdsLocalDisksLowFreeSpace 2020-07-10 12:09:35 UTC
oVirt gerrit 95083 0 ovirt-engine-4.2 MERGED tools: add -d option to engine-config 2020-07-10 12:09:35 UTC

Description Benny Zlotnik 2018-07-05 13:46:52 UTC
Description of problem:
Currently, there is no way to find out whether a user changed the default values in vdc_options using engine-config.

Having such tool would allow users to see what was changed and might be overridden when upgrading

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yedidyah Bar David 2018-07-08 06:36:27 UTC
(In reply to Benny Zlotnik from comment #0)
> Description of problem:
> Currently, there is no way to find out whether a user changed the default
> values in vdc_options using engine-config.
> 
> Having such tool would allow users to see what was changed and might be
> overridden when upgrading

I think this is a bit vague, please be more specific. E.g.:

1. If a value is changed by engine-setup, how do you want to treat that? Is this a user-change? And if it's as a result of asking the user something? Or is affected by the answerfile the user provided?

2. Same as above, but for the engine itself. Not sure it ever changes vdc_options, but it can. And even if it does not, now, it might in future versions.

3. Some values are intended "for internal use" and might needlessly confuse the user if displayed. E.g. "MinimalETLVersion". Should we show them?

4. If a value had a different default value between versions, I think you might be able to come up with two flows going through different setup/upgrade points, without changing anything manually with 'engine-config', but still have differences. If so, should these be displayed? One might claim that all such cases are bugs and should be fixed, but they can still happen. See bug 1582310 for a specific case (which we decided to not fix).

If this bug is for a specific case, perhaps provide more details. Otherwise, please realize this isn't an easy question to answer, and for users that really care, it's probably better, at least IMHO, to setup a test system (or backup/restore/upgrade on a test system), and compare the outputs of 'engine-config -a' between the production and the test systems.

Comment 2 Benny Zlotnik 2018-07-08 14:46:43 UTC
Thanks for the reply

(In reply to Yedidyah Bar David from comment #1)
> (In reply to Benny Zlotnik from comment #0)
> > Description of problem:
> > Currently, there is no way to find out whether a user changed the default
> > values in vdc_options using engine-config.
> > 
> > Having such tool would allow users to see what was changed and might be
> > overridden when upgrading
> 
> I think this is a bit vague, please be more specific. E.g.:
> 
> 1. If a value is changed by engine-setup, how do you want to treat that? Is
> this a user-change? And if it's as a result of asking the user something? Or
> is affected by the answerfile the user provided?
Since we have no way to distinguish changes made manually by users from ones that are made by engine-setup/something similar, we will have to show those as well. We are aware of such "false positives" and feel it's still good enough

> 2. Same as above, but for the engine itself. Not sure it ever changes
> vdc_options, but it can. And even if it does not, now, it might in future
> versions.
Same as above

> 3. Some values are intended "for internal use" and might needlessly confuse
> the user if displayed. E.g. "MinimalETLVersion". Should we show them?
Same as above, I am not aware of a way to tell something is internal

> 4. If a value had a different default value between versions, I think you
> might be able to come up with two flows going through different
> setup/upgrade points, without changing anything manually with
> 'engine-config', but still have differences. If so, should these be
> displayed? One might claim that all such cases are bugs and should be fixed,
> but they can still happen. See bug 1582310 for a specific case (which we
> decided to not fix).
Not entirely sure I understand, but it will show all changes made for every version, we are ok with this


> If this bug is for a specific case, perhaps provide more details. Otherwise,
> please realize this isn't an easy question to answer, and for users that
> really care, it's probably better, at least IMHO, to setup a test system (or
> backup/restore/upgrade on a test system), and compare the outputs of
> 'engine-config -a' between the production and the test systems.
We had requests for something like this from support and QE, I don't have all the links at the moment (maybe Dan can add them)
But I did find an old RFE (https://bugzilla.redhat.com/show_bug.cgi?id=1169090), while this tool doesn't really do what's asked in the RFE it does provide a way to make it easier.

Our solution automates the setup of a test system (well, it only creates the database, so it's still not ideal but still useful)

Comment 3 Martin Perina 2018-08-20 12:30:15 UTC
Removing from 4.2, I really don't like the idea of creating another database for checking what fields changes. I don't really understand why this is really needed, but if we really needed, then it should probably be part of engine-config.

Comment 4 Benny Zlotnik 2018-08-21 10:24:34 UTC
(In reply to Martin Perina from comment #3)
> Removing from 4.2, I really don't like the idea of creating another database
> for checking what fields changes. I don't really understand why this is
> really needed, but if we really needed, then it should probably be part of
> engine-config.

Hi,

As stated before, we have support engineers who requested this and QE as well.
The tool is a standalone tool and only runs if asked for explicitly. The database is created and used only during the runtime of the script, it is removed once it's finished. It won't bother anyone who does not wish to use it

Comment 5 Michal Skrivanek 2018-08-28 12:11:21 UTC
discussed briefly with Martin offline - why not just add a new field "default_value" to vdc_options table to hold the defaults and trivially modify engine-config tool to show it and/or another tool to report discrepancies?
Looks like a much cleaner implementation without messing with internal db scripts.
This should be doable in a zstream

Comment 6 Benny Zlotnik 2018-08-30 15:46:48 UTC
Hi Moti, 

We discussed this option of adding another field but found it not good enough, do you by any chance remember why?

Comment 7 Moti Asayag 2018-09-02 06:28:07 UTC
(In reply to Benny Zlotnik from comment #6)
> Hi Moti, 
> 
> We discussed this option of adding another field but found it not good
> enough, do you by any chance remember why?

IIRC, the issue with keeping the default value aside is what happens when the default value is being changed between versions.

Also, how do you obtain the actual default value ? in 4.1 we'd might have a specific set of default value and in 4.2 it might be a different set.

If we decide on having an extra field for the default value,  the documentation should state that the discrepancies tool checks for differences from the default value of a specific version only, and not from the first default value that was originally introduced (since we don't track the history of the default values).

In that case, running that tool will produce a different output for the same engine configuration values based on the version it is run against.

Comment 8 Benny Zlotnik 2018-09-03 09:47:38 UTC
The other cons in adding the extra field:
1. Will not work for older version, especially those that are relevant for most of the target users
2. Introduces more complexity and risk than a standalone script

If we're okay with these issues then I'll go ahead with the new plan
Martin, please advise

Comment 9 Martin Perina 2018-09-10 09:59:33 UTC
(In reply to Benny Zlotnik from comment #8)
> The other cons in adding the extra field:
> 1. Will not work for older version, especially those that are relevant for
> most of the target users
> 2. Introduces more complexity and risk than a standalone script
> 
> If we're okay with these issues then I'll go ahead with the new plan
> Martin, please advise

Switching to offline discussion, so clearing the needinfo

Comment 10 Pavel Novotny 2019-01-14 17:36:44 UTC
Verified in ovirt-engine-4.2.8.2-0.1.el7ev.noarch


Changes right after the engine installation, i.e., changes that have been specified during the engine-setup:
--~--
# engine-config --diff
Name: WebSocketProxy
Version: general
Current: engine.example.com:6100
Default: Off

Name: ImageProxyAddress
Version: general
Current: engine.example.com:54323
Default: localhost:54323
--~--

Let's make some more changes:
--~--
# engine-config -s ClusterEmulatedMachines=rhel6.3.0 --cver=3.0
# engine-config -s UserSessionTimeOutInterval=600
# engine-config --diff
Name: UserSessionTimeOutInterval
Version: general
Current: 600
Default: 30

Name: WebSocketProxy
Version: general
Current: engine.example.com:6100
Default: Off

Name: ImageProxyAddress
Version: general
Current: engine.example.com:54323
Default: localhost:54323

Name: ClusterEmulatedMachines
Version: 3.0
Current: rhel6.3.0
Default: rhel6.2.0
--~--

Now rollback one change and see the diff:
--~--
# engine-config -s ClusterEmulatedMachines=rhel6.2.0 --cver=3.0
# engine-config --diff
Name: UserSessionTimeOutInterval
Version: general
Current: 600
Default: 30

Name: WebSocketProxy
Version: general
Current: engine.example.com:6100
Default: Off

Name: ImageProxyAddress
Version: general
Current: engine.example.com:54323
Default: localhost:54323
--~--

Comment 11 Sandro Bonazzola 2019-01-22 10:23:29 UTC
This bugzilla is included in oVirt 4.2.8 release, published on January 22nd 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.2.8 release, 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.