Bug 1330936 - [RFE] change/add scopes = engine_files, dwh_files, reports_files
Summary: [RFE] change/add scopes = engine_files, dwh_files, reports_files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backup-Restore.Engine
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks: RHEV_from_3_6_to_4_0_Migration_Tracker
TreeView+ depends on / blocked
 
Reported: 2016-04-27 10:46 UTC by Jiri Belka
Modified: 2022-02-25 08:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-09 11:35:34 UTC
oVirt Team: Integration
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-44894 0 None None None 2022-02-25 08:14:29 UTC

Description Jiri Belka 2016-04-27 10:46:48 UTC
Description of problem:

I wanted to restore engine only from backup which contained dwh and reports as well. So I restored 'files' and 'engine' and after next engine-setup it failed with:

~~~
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160427103611-7jlxjh.log
          Version: otopi-1.5.0_master (otopi-1.5.0-0.0.master.20160424162458.gitfa92bb0.el7)
[ ERROR ] Failed to execute stage 'Environment setup': Cannot connect to DWH database using existing credentials: ovirt_engine_history@localhost:5432
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160427103611-7jlxjh.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160427103612-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed
~~~

Maybe when files would be splitted for component engine-setup would not load dwh setup files.

~~~
# grep -IR ovirt_engine_history /etc/ovirt-*
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf:DWH_DB_USER="ovirt_engine_history"
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf:DWH_DB_DATABASE="ovirt_engine_history"
/etc/ovirt-engine-reports/ovirt-engine-reports.conf.d/10-setup-database.conf:DWH_DB_USER="ovirt_engine_history"
/etc/ovirt-engine-reports/ovirt-engine-reports.conf.d/10-setup-database.conf:DWH_DB_DATABASE="ovirt_engine_history"
~~~

Version-Release number of selected component (if applicable):
ovirt-engine-tools-backup-4.0.0-0.0.master.20160426171525.git340728a.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. backup with all (engine, dwh, reports - yep, i had 3.6)
2. restore 'files', 'engine' only
3. engine-setup

Actual results:
it fails because it thinks there's dwh

Expected results:
there should be nothing related to dwh after restoring 'files' and 'engine' only

Additional info:

Comment 2 Jiri Belka 2016-04-27 10:59:14 UTC
I had ovirt-engine-dwh-setup installed, _I'll recheck again_, it's probably PEBKAC and should be closed as not bug.

Comment 3 Jiri Belka 2016-04-27 12:52:51 UTC
Hm, in 4.0 ovirt-engine-dwh-setup is pulled automatically when doing

   yum install ovirt-engine

because ovirt-engine -> ovirt-engine-setup -> ovirt-engine-setup-plugin-ovirt-engine -> ovirt-engine-dwh-setup

Comment 4 Jiri Belka 2016-04-27 13:17:32 UTC
This made engine-setup not to care about dwh setup files while ovirt-engine-dwh-setup rpm still being installed.

--- /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf.orig        2016-04-27 13:13:26.230899895 +0200
+++ /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf     2016-04-27 13:13:40.434899895 +0200
@@ -17,7 +17,7 @@ OVESETUP_CONFIG/adminUserAuthzName=str:i
 OVESETUP_CONFIG/adminUserNamespace=str:*
 OVESETUP_CONFIG/isoDomainExists=bool:True
 OVESETUP_CONFIG/isoDomainStorageDir=none:None
-OVESETUP_DWH_CORE/enable=bool:True
+OVESETUP_DWH_CORE/enable=bool:False
 OVESETUP_REPORTS_CORE/enable=bool:True
 OVESETUP_ENGINE_CONFIG/fqdn=str:10-34-60-185.example.com
 OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:True

Comment 5 Yedidyah Bar David 2016-05-05 14:24:16 UTC
Some comments:

1. The flow this bug was opened for, is currently handled in a different way - by restoring everything, then migrating stuff to other machines (using documentation, no tool provided yet).

2. A few versions ago, when engine-backup was designed and introduced, this feature could not have been implemented, because dwh and reports also kept some of their configuration in /etc/ovirt-engine. Today it's should probably be easy, need to check.

3. When eventually done, also need to consider the configuration that dwh and reports add to the engine so that it can access them.

Comment 6 Yaniv Lavi 2016-05-09 11:35:34 UTC
We will not allow to do this in migration. First you will need to upgrade to 4.0 and then you can split things to other systems or remove them.
If you do not want DWH data you should remove it before the backup stage.


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