[ovirt-devel] uuid_generate_v1 not random enough (was: Change in ovirt-engine[ovirt-engine-4.0.2]: build: ovirt-engine-4.0.2.3)
Juan Hernández
jhernand at redhat.com
Mon Aug 1 13:16:07 UTC 2016
On 08/01/2016 11:02 AM, Yedidyah Bar David wrote:
> On Sun, Jul 31, 2016 at 6:35 PM, Jenkins CI <gerrit2 at gerrit.ovirt.org> wrote:
>> Jenkins CI has posted comments on this change.
>>
>> Change subject: build: ovirt-engine-4.0.2.3
>> ......................................................................
>>
>>
>> Patch Set 2:
>>
>> Build Failed
>>
>> http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-el7-x86_64/64/ : FAILURE
>
> 15:07:43 Running upgrade sql script
> './packaging/dbscripts/upgrade/03_05_0580_add_default_instance_types.sql'...
> 15:07:43 psql:./packaging/dbscripts/upgrade/03_05_0580_add_default_instance_types.sql:131:
> ERROR: duplicate key value violates unique constraint
> "pk_permissions_id"
> 15:07:43 DETAIL: Key (id)=() already exists.
>
> Didn't try reproducing, but my best guess is that above uuid
> was generated by a call to uuid_generate_v1() in above file after it
> was already inserted to the table in
> dbscripts/data/00600_insert_permissions.sql.
>
> Perhaps we should be using something more random.
>
> [1] https://www.postgresql.org/docs/9.5/static/uuid-ossp.html
>
Note that we did use that long time ago, and we decided to stop using it
because enabling that extension required an additional RPM package
(postgrersql-contrib) and different mechanisms to enable it in
PostgreSQL 8 and PostgreSQL 9, which was cumbersome. As we should now
support only PostgreSQL 9.2 or newer, this may be no longer a problem.
In that case you can just remove our "uuid_generate_v1" function and
enable the extension, the name of the function is the same.
However, it would be better, in general, to generate the identifiers
outside of the database, and pass them as parameters to the stored
procedures or SQL statements, that way we have less dependencies.
See bug 870056 for additional information.
>>
>> http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-fc23-x86_64/64/ : SUCCESS
>>
>> --
>> To view, visit https://gerrit.ovirt.org/61733
>> To unsubscribe, visit https://gerrit.ovirt.org/settings
>>
>> Gerrit-MessageType: comment
>> Gerrit-Change-Id: Ice9518eea22dfa19126e04e49f3a76ee86f3e3c0
>> Gerrit-PatchSet: 2
>> Gerrit-Project: ovirt-engine
>> Gerrit-Branch: ovirt-engine-4.0.2
>> Gerrit-Owner: Yedidyah Bar David <didi at redhat.com>
>> Gerrit-Reviewer: Eyal Edri <eedri at redhat.com>
>> Gerrit-Reviewer: Jenkins CI
>> Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
>> Gerrit-Reviewer: Yedidyah Bar David <didi at redhat.com>
>> Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
>> Gerrit-HasComments: No
>
>
>
--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
More information about the Infra
mailing list