Bug 1534928 - [Docs][Install] Add a requirement for uuid-ossp extension to remote database installation for engine database
Summary: [Docs][Install] Add a requirement for uuid-ossp extension to remote database ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.1
: ---
Assignee: Byron Gravenorst
QA Contact: Billy Burmester
URL:
Whiteboard: docs-accepted
: 1538250 (view as bug list)
Depends On: 1515635
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-16 10:15 UTC by Martin Perina
Modified: 2019-05-07 12:50 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-06 05:25:54 UTC
oVirt Team: Docs
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Perina 2018-01-16 10:15:55 UTC
Description of problem:

As a part of BZ1515635 we have added a required for uuid-ossp PostgreSQL extension to be present in engine database. For databases managed by engine-setup this is performed automatically, but non-managed databases (usually remote databases) this is needs to be done manually by administrators.

We need to add following steps:

New installation:
  1. Requirement to install rh-postgresql95-postgresql-contrib package
     on remote database host
  2. Once database is created administrators need to add uuid-ossp extension
     to it using: 
       su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
       postgres=# CREATE EXTENSION "uuid-ossp";;

Upgrade:
  1. Requirement to install rh-postgresql95-postgresql-contrib package
     on remote database host
  2. Once database is upgraded to 9.5 administrators need to remove our custom implementation and add uuid-ossp extension
     to it using: 
       su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
       postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1();;
       postgres=# CREATE EXTENSION "uuid-ossp";


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2018-01-16 10:18:22 UTC
- Do we need it before upgrade of RHV Manager? (do we assume the external DB is upgraded before? During?)
- Can we provide a normal check for this, so users will not it's not correctly installed?
- Any chance for an Ansible playbook to do it?

Comment 2 Yedidyah Bar David 2018-01-16 10:23:03 UTC
(In reply to Yaniv Kaul from comment #1)
> - Do we need it before upgrade of RHV Manager? (do we assume the external DB
> is upgraded before? During?)

See also bug 1498351.

> - Can we provide a normal check for this, so users will not it's not
> correctly installed?

We do, and want to improve it, see also bug 1534913.

> - Any chance for an Ansible playbook to do it?

Comment 3 Martin Perina 2018-01-16 20:41:50 UTC
(In reply to Yaniv Kaul from comment #1)
> - Do we need it before upgrade of RHV Manager? (do we assume the external DB
> is upgraded before? During?)

AFAIK the correct steps for upgrade are:

1. Stop the engine
2. Add repos if needed and upgrade 'engine*setup*' packages
3. Upgrade remote db from PG 9.2 to SCL PG 9.5 (including installing uuid-ossp extension as this bug covers)
4. Execute engine-setup to perform engine upgrade

> - Can we provide a normal check for this, so users will not it's not
> correctly installed?

Well right now if uuid-ossp extension is not installed we will detect that during engine-setup part and failed the upgrade.

We have opened BZ1498351 to try to detect that in early stages of engine-setup before we actually started to do the upgrade, so we will not need to perform rollback of engine-setup upgrade.

> - Any chance for an Ansible playbook to do it?

AFAIK docs team is already working on Upgrade Guide to specify database upgrade steps which similar to new remote db installation [1]. So yes, in theory we should be able to create an Ansible playbook to perform all those steps. Although I'd expect that users with remote db did that on purpose and they have experiences with managing PostgreSQL database, so not how useful would be that playbook for them comparing to detailed steps in upgrade guide.


[1] https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2-beta/html/installation_guide/appe-preparing_a_remote_postgresql_database_for_use_with_the_red_hat_enterprise_virtualization_manager

Comment 4 Martin Perina 2018-01-16 20:47:02 UTC
(In reply to Martin Perina from comment #0)
> Description of problem:
> 
> As a part of BZ1515635 we have added a required for uuid-ossp PostgreSQL
> extension to be present in engine database. For databases managed by
> engine-setup this is performed automatically, but non-managed databases
> (usually remote databases) this is needs to be done manually by
> administrators.
> 
> We need to add following steps:
> 
> New installation:
>   1. Requirement to install rh-postgresql95-postgresql-contrib package
>      on remote database host
>   2. Once database is created administrators need to add uuid-ossp extension
>      to it using: 
>        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
>        postgres=# CREATE EXTENSION "uuid-ossp";;

Correction:

        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine"
        postgres=# CREATE EXTENSION "uuid-ossp";


> 
> Upgrade:
>   1. Requirement to install rh-postgresql95-postgresql-contrib package
>      on remote database host
>   2. Once database is upgraded to 9.5 administrators need to remove our
> custom implementation and add uuid-ossp extension
>      to it using: 
>        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
>        postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1();;
>        postgres=# CREATE EXTENSION "uuid-ossp";

Correction:
        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine"
        postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1();
        postgres=# CREATE EXTENSION "uuid-ossp";

In both above examples "engine" specified using "-d" option is the name of engine database

Comment 5 Martin Perina 2018-01-16 20:47:23 UTC
(In reply to Martin Perina from comment #0)
> Description of problem:
> 
> As a part of BZ1515635 we have added a required for uuid-ossp PostgreSQL
> extension to be present in engine database. For databases managed by
> engine-setup this is performed automatically, but non-managed databases
> (usually remote databases) this is needs to be done manually by
> administrators.
> 
> We need to add following steps:
> 
> New installation:
>   1. Requirement to install rh-postgresql95-postgresql-contrib package
>      on remote database host
>   2. Once database is created administrators need to add uuid-ossp extension
>      to it using: 
>        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
>        postgres=# CREATE EXTENSION "uuid-ossp";;

Correction:

        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine"
        postgres=# CREATE EXTENSION "uuid-ossp";


> 
> Upgrade:
>   1. Requirement to install rh-postgresql95-postgresql-contrib package
>      on remote database host
>   2. Once database is upgraded to 9.5 administrators need to remove our
> custom implementation and add uuid-ossp extension
>      to it using: 
>        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine_test"
>        postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1();
>        postgres=# CREATE EXTENSION "uuid-ossp";

Correction:
        su - postgres -c "scl enable rh-postgresql95 -- psql -d engine"
        postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1();
        postgres=# CREATE EXTENSION "uuid-ossp";

In both above examples "engine" specified using "-d" option is the name of engine database

Comment 6 Martin Perina 2018-01-24 18:21:02 UTC
*** Bug 1538250 has been marked as a duplicate of this bug. ***

Comment 9 Jiri Belka 2018-01-25 16:21:06 UTC
I did my own 4.1 -> 4.2 upgrade with remote db, see https://bugzilla.redhat.com/show_bug.cgi?id=1498351#c12

Comment 10 Yedidyah Bar David 2018-01-28 07:18:37 UTC
I agree we can close current bug if we make sure we do not forget about uuid-ossp in bug 1498351. We opened that one before current, and didn't mention uuid-ossp in the description, so it might be better to keep both open just to not forget, or maintain somewhere else a checklist of subjects to be handled there.

Comment 11 Lucy Bopf 2018-01-29 05:36:15 UTC
(In reply to Yedidyah Bar David from comment #10)
> I agree we can close current bug if we make sure we do not forget about
> uuid-ossp in bug 1498351. We opened that one before current, and didn't
> mention uuid-ossp in the description, so it might be better to keep both
> open just to not forget, or maintain somewhere else a checklist of subjects
> to be handled there.

Thanks, Didi. To confirm, are you suggesting that there is no work to do in this bug? I had thought to use it for updates to the installation procedure, which we could release ASAP, since this bug seems to affect install and upgrade, and upgrade is waiting until GA. Is that still the case?

Comment 12 Yedidyah Bar David 2018-01-29 06:39:05 UTC
Sorry, you are right. Current bug affects both new install and upgrades.

Comment 19 Byron Gravenorst 2018-02-06 01:00:51 UTC
Moving to ON_QA

Comment 21 Billy Burmester 2018-02-06 03:01:35 UTC
Reviewed, all OK.


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