Bug 1394971 - [Docs][DWH] Update steps for migrating Data Warehouse database to a separate machine
Summary: [Docs][DWH] Update steps for migrating Data Warehouse database to a separate ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation
Version: 4.0.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.1.6
: ---
Assignee: Emma Heftman
QA Contact: Megan Lewis
URL:
Whiteboard:
Depends On: 1351864 1421659 1422077
Blocks: 1512814
TreeView+ depends on / blocked
 
Reported: 2016-11-14 22:30 UTC by Ameya Charekar
Modified: 2021-06-10 11:40 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1512814 (view as bug list)
Environment:
Last Closed: 2017-11-29 12:41:00 UTC
oVirt Team: Docs
Target Upstream Version:
Embargoed:
eheftman: needinfo-
lsvaty: testing_plan_complete-


Attachments (Terms of Use)

Description Ameya Charekar 2016-11-14 22:30:10 UTC
Description of problem:
Unable to migrate Data Warehouse Database to a Separate Machine.

Version-Release number of selected component (if applicable):
ovirt-engine-dwh-4.0.2-1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
- Following section "1.3. Migrating Data Warehouse to a Separate Machine" from 
Data Warehouse Guide:

https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/single/data-warehouse-guide

Actual results:
Unable to migrate DWH to separate machine, engine-setup is failing with below error:
~~~
2016-10-28 13:53:25 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine-dwh/core/single_etl.py", line 172, in _misc
    value=self.environment[osetupcons.ConfigEnv.FQDN]
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/dwh_history_timekeeping.py", line 59, in updateValueInTimekeeping
    getValueFromTimekeeping(statement, name, raise_if_empty=True)
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/dwh_history_timekeeping.py", line 35, in getValueFromTimekeeping
    result = statement.execute(
AttributeError: 'NoneType' object has no attribute 'execute'
2016-10-28 13:53:25 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'execute'


2016-10-28 13:53:38 DEBUG otopi.ovirt_engine_setup.engine_common.database database.restore:778 db restore rc 1 stderr ['pg_restore: [archiver (db)] Error while PROCESSING TOC:', 'pg_restore: [archiver (db)] Error from TOC entry 3993; 0 0 COMMENT EXTENSION plpgsql ', 'pg_restore: [archiver (db)] could not execute query: ERROR:  must be owner of extension plpgsql', "    Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';", '', '', '', 'pg_restore: WARNING:  no privileges could be revoked for "public"', 'pg_restore: WARNING:  no privileges could be revoked for "public"', 'pg_restore: WARNING:  no privileges were granted for "public"', 'pg_restore: WARNING:  no privileges were granted for "public"', 'WARNING: errors ignored on restore: 1']
~~~

Expected results:
Able to successfully migrate DWH to separate machine.

Additional info:

Comment 2 Yedidyah Bar David 2016-11-28 09:46:53 UTC
Please attach, from the dwh machine:
/var/log/ovirt-engine/setup/*
/var/log/yum.log

Thanks.

Comment 3 Yedidyah Bar David 2016-11-28 09:52:05 UTC
Also, please describe the flow in detail.

Do you want to migrate the database as well?

Do you want the database and dwh service on separate machines?

Perhaps you ran 'engine-setup' after running restore (Procedure 1.1 step 4)?

Comment 4 Yedidyah Bar David 2016-11-28 10:10:33 UTC
Sorry, now reproduced. Flow was to follow all of the steps there - backup dwh db on engine machine, restore it on a new machine, then run there engine-setup, with final expected result being dwhd+dwh db on this new machine. I'll think a bit about best solution, but I think this will be to change the docs.

Comment 5 Yedidyah Bar David 2016-11-28 11:18:05 UTC
The following workaround seems to work for me:

Add to the beginning of "Procedure 1.4. Step 3: Configuring the New Data Warehouse Machine", before 'engine-setup':

sed -i '/^ENGINE_DB_/d' /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf

sed -i -e 's;^OVESETUP_ENGINE_CORE/enable=bool:True;OVESETUP_ENGINE_CORE/enable=bool:False;' -e '/^OVESETUP_CONFIG\/fqdn/d' /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf

This applies to migration of both dwh and dwh db to the same machine.

To clarify:

Originally, everything (engine, dwh and their databases) are all on the same machine, let's call it A.

We want to migrate dwh to a new machine B.

There are 3 options, thus 3 flows, for the dwh database:
1. Keep it on A
2. Migrate it to B as well
3. Migrate it to a third machine C

Current bug is about (2.).

Comment 6 Sandro Bonazzola 2016-11-28 12:39:46 UTC
Looks good to me, so moving to documentation.

Comment 17 Lucy Bopf 2017-08-02 08:28:06 UTC
Assigning to Emma for review.

Emma, see comment 15 for the required changes.

Comment 18 Emma Heftman 2017-08-13 10:55:56 UTC
Hi Didi
After looking over all the information in this bug, it seems to be there are two separate document tasks here.

1. Megan has worked on section 1.3.2 Migrating the Data Warehouse Service to a Separate Machine. 

this is a link to her documentation which I believe has not been reviewed and approved.
http://file.tlv.redhat.com/~eheftman/bz1394971/html-single/#Migrating_the_Data_Warehouse_Service_to_a_Separate_Machine


Obviously Megan's document does not include your additional step, however, Lukas already tested, successfully the old documentation with your new step.

So, my question is whether there is information in Megan's document that we would like to pull over to the original document, or whether I should simply use the original document with the addition of your step from Comment 5.

Comment 23 Emma Heftman 2017-09-17 07:36:33 UTC
Hi Didi
Could you please help me to clarify what needs to be done now.

A. Are you still planning to check the documentation from here:
https://gitlab.cee.redhat.com/rhci-documentation/docs-Red_Hat_Enterprise_Virtualization/commit/7e890e24a1f792bd59d580be0e7707fb1354c77d

or 

B. Should I simply be following the tested scenario as the other changes (Megan's) were never tested?

If so, am I correct in my understanding that the only documentation change that is required following the testing is this:

After the engine-setup on remote dwh machine, setup instructs:
> > Please restart the engine by running the following on 
> >           # service ovirt-engine restart
> >           This is required for the dashboard to work.

Comment 24 Emma Heftman 2017-09-17 11:08:39 UTC
After discussing all comments including Megan's changes with Didi I will be
1. Incorporating Megan's changes.
2. Incorporating several suggestions made by Lucas
3. Adding the additional step from comment 5 that resolves the issue of installing the database and the service on separate machines.
4.Adding additional information about the option of installing the database and engine on the same machine or on two separate machines.

Comment 26 Yedidyah Bar David 2017-09-17 13:11:51 UTC
(In reply to Emma Heftman from comment #24)
> After discussing all comments including Megan's changes with Didi I will be
> 1. Incorporating Megan's changes.
> 2. Incorporating several suggestions made by Lucas

+1

> 3. Adding the additional step from comment 5 that resolves the issue of
> installing the database and the service on separate machines.

You mean "on the same (separate) machine" - that is, flow (2.) of comment 5.

> 4.Adding additional information about the option of installing the database
> and engine on the same machine or on two separate machines.

+1

Comment 33 Emma Heftman 2017-10-15 12:49:21 UTC
Reassigning to Tahlia

Comment 34 Megan Lewis 2017-10-19 00:27:29 UTC
Reassigning back to myself as Tahlia hasn't started the review and I'm back at work and have prior knowledge of the content.

Comment 39 Emma Heftman 2017-10-29 09:35:31 UTC
Hi Francois
The updated documentation is now available on the Customer Portal:
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html-single/data_warehouse_guide/#sect-Migrating_Data_Warehouse_to_a_Separate_Machine

Comment 43 Emma Heftman 2017-11-06 11:44:44 UTC
Hey Didi
Can you confirm whether the procedure that we worked on in this bug will also work in exactly the same way in 4.0?

Also, you mentioned to me while reviewing the 4.1 text that the PostgreSQL version should be 9.6, but according to this bug it should be 9.5 in version 4.2.

https://bugzilla.redhat.com/show_bug.cgi?id=1492549

So, can you please confirm what the correct version should be for 4.0 and 4.1. 
Thanks!
Emma

Comment 44 Yedidyah Bar David 2017-11-06 13:10:56 UTC
(In reply to Emma Heftman from comment #43)
> Hey Didi
> Can you confirm whether the procedure that we worked on in this bug will
> also work in exactly the same way in 4.0?

In principle yes. You might ask QE to make sure, if you want to change 4.0 docs. I think Lukas already did, based on comment 15, not certain.

> 
> Also, you mentioned to me while reviewing the 4.1 text that the PostgreSQL
> version should be 9.6, but according to this bug it should be 9.5 in version
> 4.2.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1492549
> 
> So, can you please confirm what the correct version should be for 4.0 and
> 4.1. 

4.0 and 4.1 use the OS-supplied version, which is 9.2 for RHEL 7.

4.2 will use 9.5, from SCL (Software Collections).

AFAIU QE tested also 9.6, see bug 1459134 - I guess it was only on Fedora - on Fedora 26 the default is postgresql 9.6. Irrelevant for RHV docs.

Comment 45 Emma Heftman 2017-11-06 14:06:12 UTC
As t(In reply to Yedidyah Bar David from comment #44)
> (In reply to Emma Heftman from comment #43)
> > Hey Didi
> > Can you confirm whether the procedure that we worked on in this bug will
> > also work in exactly the same way in 4.0?
> 
> In principle yes. You might ask QE to make sure, if you want to change 4.0
> docs. I think Lukas already did, based on comment 15, not certain.
> 
> > 
> > Also, you mentioned to me while reviewing the 4.1 text that the PostgreSQL
> > version should be 9.6, but according to this bug it should be 9.5 in version
> > 4.2.
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=1492549
> > 
> > So, can you please confirm what the correct version should be for 4.0 and
> > 4.1. 
> 
> 4.0 and 4.1 use the OS-supplied version, which is 9.2 for RHEL 7.
> 
> 4.2 will use 9.5, from SCL (Software Collections).
> 
> AFAIU QE tested also 9.6, see bug 1459134 - I guess it was only on Fedora -
> on Fedora 26 the default is postgresql 9.6. Irrelevant for RHV docs.


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