Bug 1335009

Summary: [RFE] Add option to run DWH in a "minimal" mode for collecting data for the dashboards
Product: [oVirt] ovirt-engine Reporter: Yedidyah Bar David <didi>
Component: Setup.CoreAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.0CC: bugs, dfediuck, pnovotny, pstehlik, sbonazzo, sradco, ylavi
Target Milestone: ovirt-4.0.0-betaKeywords: FutureFeature
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
lsvaty: testing_plan_complete-
ylavi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1328805 Environment:
Last Closed: 2016-07-05 07:53:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1328805    
Bug Blocks: 1324860, 1337280, 1351872    

Description Yedidyah Bar David 2016-05-11 06:55:37 UTC
+++ This bug was initially created as a clone of Bug #1328805 +++

we would like to have new system dashboard for the admin portal.
The dashboards are dependent on data collected by DWH.
This is why we enforce DWH setup along with engine setup.

We want to add the option of installing a "lean" version of DWH that will store the data for a smaller time frame.

For that we will need to add an answer file that will update ovirt-engine-dwhd.conf

Defaults
# Table Sizes Control in Hours
DWH_TABLES_KEEP_SAMPLES=24
DWH_TABLES_KEEP_HOURLY=1440
DWH_TABLES_KEEP_DAILY=43800    


* No daily aggregations required.
* Hourly data should be saved for 30 days.

Should update:
# Table Sizes Control in Hours
DWH_TABLES_KEEP_SAMPLES=24
DWH_TABLES_KEEP_HOURLY=720
DWH_TABLES_KEEP_DAILY=0

--- Additional comment from Sandro Bonazzola on 2016-05-02 12:52:00 IDT ---

Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

--- Additional comment from Yedidyah Bar David on 2016-05-09 13:20:06 IDT ---

Current patch allows reconfiguring scale by running:

engine-setup --otopi-environment='OVESETUP_DWH_CONFIG/scale=none:None'

Allowing doing that with '--reconfigure-optional-components' will require a somewhat-significant change that can break stuff - e.g.:

1. yum install engine+dwh
2. engine-setup engine+dwh
3. engine-setup --reconfigure-optional-components
Currently, engine and dwh are not asked about. If we want to allow that, users can reply 'No', and Bad Things Might Happen (didn't check what, actually).

We can instead add a new option to engine-setup, say '--reconfigure-dwh-scale' that will do exactly the same as:
 --otopi-environment='OVESETUP_DWH_CONFIG/scale=none:None'

Yaniv, what do you say?

--- Additional comment from Yaniv Dary on 2016-05-09 14:28:55 IDT ---

(In reply to Yedidyah Bar David from comment #2)
> Current patch allows reconfiguring scale by running:
> 
> engine-setup --otopi-environment='OVESETUP_DWH_CONFIG/scale=none:None'
> 
> Allowing doing that with '--reconfigure-optional-components' will require a
> somewhat-significant change that can break stuff - e.g.:
> 
> 1. yum install engine+dwh
> 2. engine-setup engine+dwh
> 3. engine-setup --reconfigure-optional-components
> Currently, engine and dwh are not asked about. If we want to allow that,
> users can reply 'No', and Bad Things Might Happen (didn't check what,
> actually).
> 
> We can instead add a new option to engine-setup, say
> '--reconfigure-dwh-scale' that will do exactly the same as:
>  --otopi-environment='OVESETUP_DWH_CONFIG/scale=none:None'
> 
> Yaniv, what do you say?

As long as it is in the help, I don't mind the flag name we use.

--- Additional comment from Yedidyah Bar David on 2016-05-10 11:55:59 IDT ---

(In reply to Yaniv Dary from comment #3)
> As long as it is in the help, I don't mind the flag name we use.

Adding to the help is easy.

Adding to the help only when dwh is installed and/or set up is not.

Which one?

--- Additional comment from Yaniv Dary on 2016-05-10 13:21:20 IDT ---

(In reply to Yedidyah Bar David from comment #4)
> (In reply to Yaniv Dary from comment #3)
> > As long as it is in the help, I don't mind the flag name we use.
> 
> Adding to the help is easy.
> 
> Adding to the help only when dwh is installed and/or set up is not.
> 
> Which one?

The first, not conditional.

--- Additional comment from Yedidyah Bar David on 2016-05-11 09:51:39 IDT ---

Will clone this bug to engine and add there 57303

Comment 1 Yedidyah Bar David 2016-05-11 06:58:12 UTC
Cloned for adding the option to engine-setup's command line and --help.

Comment 2 Red Hat Bugzilla Rules Engine 2016-05-11 06:58:17 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 3 Pavel Novotny 2016-06-09 15:46:59 UTC
Verified in rhevm-4.0.0.2-0.1.el7ev.noarch, ovirt-engine-setup-4.0.0.2-0.1.el7ev.noarch (build 4.0.0-12).

Installation with the basic DWH scale:

# yum install -y ovirt-engine-setup && engine-setup
...
Configure Data Warehouse on this host (Yes, No) [Yes]: yes
...
Please choose Data Warehouse sampling scale:
(1) Basic
(2) Full
(1, 2)[1]: 1
...
[ INFO  ] Execution of setup completed successfully

# grep -r DWH_TABLES_KEEP /etc/ovirt-engine-dwh/*
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_SAMPLES=24
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_HOURLY=720
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_DAILY=0


Update/reconfiguration to the full DWH scale:

# engine-setup --help
Usage: /usr/bin/engine-setup
...
    --reconfigure-dwh-scale
        If DWH is configured, allow changing its scale.

# engine-setup --reconfigure-dwh-scale
...
Please choose Data Warehouse sampling scale:
(1) Basic
(2) Full
(1, 2)[1]: 2
...
[ INFO  ] Execution of setup completed successfully

# grep -r DWH_TABLES_KEEP /etc/ovirt-engine-dwh/*
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_SAMPLES=24
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_HOURLY=1440
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf:DWH_TABLES_KEEP_DAILY=43800
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf.20160609154211:DWH_TABLES_KEEP_SAMPLES=24
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf.20160609154211:DWH_TABLES_KEEP_HOURLY=720
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-scale.conf.20160609154211:DWH_TABLES_KEEP_DAILY=0

Comment 4 Sandro Bonazzola 2016-07-05 07:53:23 UTC
oVirt 4.0.0 has been released, closing current release.