Change in ovirt-engine[master]: improve propriety UUID generation
mperina at redhat.com
mperina at redhat.com
Wed Aug 24 14:34:59 UTC 2016
Martin Peřina 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:
Martin Peřina: Looks good to me, approved
Eli Mesika: Verified
Juan Hernandez: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/62318
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f3211f7d83ba2b4a37c5d533911ecd0d7f03e58
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina 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