Bug 1515635

Summary: [RFE] Drop uuid_generate_v1() internal implementation and use the implementation from standard PostgreSQL uuid-ossp extension
Product: [oVirt] ovirt-engine Reporter: Martin Perina <mperina>
Component: Database.CoreAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: high    
Version: ---CC: bugs, eberman, lsvaty, lveyde, mgoldboi, pstehlik, ylavi
Target Milestone: ovirt-4.2.1Keywords: FutureFeature, Performance
Target Release: ---Flags: rule-engine: ovirt-4.2+
mgoldboi: exception+
lsvaty: testing_plan_complete-
mgoldboi: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.1.2 Doc Type: Release Note
Doc Text:
We have added a requirement 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 needs to be done manually by administrators. Here are required additional 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" 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" postgres=# DROP FUNCTION IF EXISTS uuid_generate_v1(); postgres=# CREATE EXTENSION "uuid-ossp"; In both above example "engine" specified using "-d" option is the name of engine database
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:46:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1534913, 1534928    

Description Martin Perina 2017-11-21 06:43:08 UTC
Description of problem:

We have our own implementation of uuid_generate_v1() function, which was introduced to allow smoother transition between PostgreSQL 8.x and 9.x. But since PG 9.x there is a standard implementation of uuid_generate_v1() which is provided by uuid-ossp PostgreSQL extension.

This extension included in postgresql-contrib package which is part of both standard and SCL versions of PostgreSQL and it's significantly faster than our own implementation. Unfortunately installing this extension requires administrator privileges, so it cannot be part of our normal database upgrade scripts, but switching to SCL PostgreSQL 9.5 is a great opportunity to make this change.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Pavel Stehlik 2017-11-27 09:14:46 UTC
CodeChange - QE just sanity.

Comment 2 Lukas Svaty 2018-01-19 13:11:20 UTC
CodeChange moving to VERIFIED

Comment 4 Lukas Svaty 2018-01-19 13:48:22 UTC
removing codeChange as after discussion this needs further verification

Comment 6 Jiri Belka 2018-01-24 17:27:16 UTC
We need to extend docs for remote db scenario, otherwise dbadmin of remote db won't have remote db configured correctly.

Comment 7 Martin Perina 2018-01-24 18:22:02 UTC
(In reply to Jiri Belka from comment #6)
> We need to extend docs for remote db scenario, otherwise dbadmin of remote
> db won't have remote db configured correctly.

Right, we already have BZ1534928 to track that.

Comment 8 Jiri Belka 2018-01-25 16:24:03 UTC
ok, all steps in #3 were passess ok.

ovirt-engine-setup-base-4.2.1.3-0.1.el7.noarch

Comment 9 Sandro Bonazzola 2018-02-12 11:46:43 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.