Change in ovirt-engine[ovirt-engine-4.0]: improve propriety UUID generation

tnisan at redhat.com tnisan at redhat.com
Mon Aug 29 09:25:13 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: improve propriety UUID generation
......................................................................


improve propriety UUID generation

UUID generation is not random enough and may generate in some circumstances
duplicate UUIDs

I was thinking first to use the native PG UUID generator but this seems
complex since the UUID generator functions are provided as a PG
extension that only a super user DB role can install and even if we
handled that in engine-setup, it will solve only local provisioned DB.

In this patch I suggest the following improvements to the
uuid_generate_v1 function

1) Setting a seed before using the random() function
2) Generating the first 8 characters using the clock timestamp value
3) Improve randomness of other generated values

I believe that the above is a pretty simple solution that is sufficient
for our needs

Change-Id: I3f3211f7d83ba2b4a37c5d533911ecd0d7f03e58
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1362459
Signed-off-by: emesika <emesika at redhat.com>
---
M packaging/dbscripts/create_functions.sql
1 file changed, 19 insertions(+), 6 deletions(-)

Approvals:
  Sandro Bonazzola: Looks good to me, but someone else must approve
  Martin Peřina: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests
  Yedidyah Bar David: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/62859
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f3211f7d83ba2b4a37c5d533911ecd0d7f03e58
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <didi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list