From 9eff4af096f60b302abc9ad591f8b5fed45945a4 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 16 May 2017 13:23:02 -0400 Subject: [PATCH] 11644: Ensure generated UUIDs are always 27 chars. --- services/keepstore/volume.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go index 836e8c6fdc..07b497cc2a 100644 --- a/services/keepstore/volume.go +++ b/services/keepstore/volume.go @@ -3,6 +3,7 @@ package main import ( "context" "crypto/rand" + "fmt" "io" "math/big" "sync/atomic" @@ -295,7 +296,7 @@ func (*VolumeMount) generateUUID() string { if err != nil { panic(err) } - return "zzzzz-ivpuk-" + r.Text(36) + return fmt.Sprintf("zzzzz-ivpuk-%015s", r.Text(36)) } // RRVolumeManager is a round-robin VolumeManager: the Nth call to -- 2.39.5