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:
Please attach, from the dwh machine: /var/log/ovirt-engine/setup/* /var/log/yum.log Thanks.
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)?
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.
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.).
Looks good to me, so moving to documentation.
Assigning to Emma for review. Emma, see comment 15 for the required changes.
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.
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.
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.
(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
Reassigning to Tahlia
Reassigning back to myself as Tahlia hasn't started the review and I'm back at work and have prior knowledge of the content.
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
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
(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.
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.
Updated documentation is available here: 4.1: 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 4.0: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.0/html-single/data_warehouse_guide/#sect-Migrating_Data_Warehouse_to_a_Separate_Machine