[ARVADOS] updated: 9eff4af096f60b302abc9ad591f8b5fed45945a4
Git user
git at public.curoverse.com
Tue May 16 13:23:26 EDT 2017
Summary of changes:
services/keepstore/volume.go | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
via 9eff4af096f60b302abc9ad591f8b5fed45945a4 (commit)
via c4b5194c18567d470bb44c6eae29743ccaaa748d (commit)
from 8cc51c761385bd6acc5dbaf7e95994e916ca0d0d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 9eff4af096f60b302abc9ad591f8b5fed45945a4
Author: Tom Clegg <tom at curoverse.com>
Date: Tue May 16 13:23:02 2017 -0400
11644: Ensure generated UUIDs are always 27 chars.
diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go
index 836e8c6..07b497c 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
commit c4b5194c18567d470bb44c6eae29743ccaaa748d
Author: Tom Clegg <tom at curoverse.com>
Date: Tue May 16 13:22:42 2017 -0400
11644: Add volume replication level to /mounts response.
diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go
index d23fcc8..836e8c6 100644
--- a/services/keepstore/volume.go
+++ b/services/keepstore/volume.go
@@ -275,11 +275,12 @@ type VolumeManager interface {
// A VolumeMount is an attachment of a Volume to a VolumeManager.
type VolumeMount struct {
- UUID string
- DeviceID string
- ReadOnly bool
- Tier int
- volume Volume
+ UUID string
+ DeviceID string
+ ReadOnly bool
+ Replication int
+ Tier int
+ volume Volume
}
// Generate a UUID the way API server would for a "KeepVolumeMount"
@@ -317,11 +318,12 @@ func MakeRRVolumeManager(volumes []Volume) *RRVolumeManager {
vm.mountMap = make(map[string]*VolumeMount)
for _, v := range volumes {
mnt := &VolumeMount{
- UUID: (*VolumeMount)(nil).generateUUID(),
- DeviceID: "",
- ReadOnly: !v.Writable(),
- Tier: 1,
- volume: v,
+ UUID: (*VolumeMount)(nil).generateUUID(),
+ DeviceID: "",
+ ReadOnly: !v.Writable(),
+ Replication: v.Replication(),
+ Tier: 1,
+ volume: v,
}
if v, ok := v.(interface {
DeviceID() string
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list