[ARVADOS] updated: a4d0d55ac333e8060d13a600d8aa8f5443760b29

git at public.curoverse.com git at public.curoverse.com
Thu Jan 21 15:27:50 EST 2016


Summary of changes:
 services/keepstore/azure_blob_volume.go | 5 +++++
 services/keepstore/keepstore_test.go    | 2 ++
 services/keepstore/s3_volume.go         | 4 ++++
 services/keepstore/volume_unix.go       | 4 ++++
 4 files changed, 15 insertions(+)

       via  a4d0d55ac333e8060d13a600d8aa8f5443760b29 (commit)
      from  2a6e0785f8fb675038f867aebc65033dc8a85211 (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 a4d0d55ac333e8060d13a600d8aa8f5443760b29
Author: radhika <radhika at curoverse.com>
Date:   Thu Jan 21 15:25:06 2016 -0500

    8178: All three currently supported volumes return error when trash-lifetime period is not configured. azure blob and s3 volumes are updated to do so.
    Returning an error is causing test failures in unix volume and hence is still a work in progress.

diff --git a/services/keepstore/azure_blob_volume.go b/services/keepstore/azure_blob_volume.go
index 0071567..f135835 100644
--- a/services/keepstore/azure_blob_volume.go
+++ b/services/keepstore/azure_blob_volume.go
@@ -43,6 +43,11 @@ type azureVolumeAdder struct {
 }
 
 func (s *azureVolumeAdder) Set(containerName string) error {
+	if trashLifetime <= 0 {
+		log.Print("Missing required configuration parameter: trash-lifetime")
+		return ErrNotImplemented
+	}
+
 	if containerName == "" {
 		return errors.New("no container name given")
 	}
diff --git a/services/keepstore/keepstore_test.go b/services/keepstore/keepstore_test.go
index 2a1c3d2..746d99e 100644
--- a/services/keepstore/keepstore_test.go
+++ b/services/keepstore/keepstore_test.go
@@ -335,6 +335,7 @@ func TestDiscoverTmpfs(t *testing.T) {
 	f.Close()
 	ProcMounts = f.Name()
 
+	trashLifetime = 24 * 60 * 60
 	resultVols := volumeSet{}
 	added := (&unixVolumeAdder{&resultVols}).Discover()
 
@@ -375,6 +376,7 @@ func TestDiscoverNone(t *testing.T) {
 	f.Close()
 	ProcMounts = f.Name()
 
+	trashLifetime = 24 * 60 * 60
 	resultVols := volumeSet{}
 	added := (&unixVolumeAdder{&resultVols}).Discover()
 	if added != 0 || len(resultVols) != 0 {
diff --git a/services/keepstore/s3_volume.go b/services/keepstore/s3_volume.go
index 16afc32..17cc194 100644
--- a/services/keepstore/s3_volume.go
+++ b/services/keepstore/s3_volume.go
@@ -39,6 +39,10 @@ type s3VolumeAdder struct {
 }
 
 func (s *s3VolumeAdder) Set(bucketName string) error {
+	if trashLifetime <= 0 {
+		log.Print("Missing required configuration parameter: trash-lifetime")
+		return ErrNotImplemented
+	}
 	if bucketName == "" {
 		return fmt.Errorf("no container name given")
 	}
diff --git a/services/keepstore/volume_unix.go b/services/keepstore/volume_unix.go
index da1d390..1be622c 100644
--- a/services/keepstore/volume_unix.go
+++ b/services/keepstore/volume_unix.go
@@ -23,6 +23,10 @@ type unixVolumeAdder struct {
 }
 
 func (vs *unixVolumeAdder) Set(value string) error {
+	if trashLifetime <= 0 {
+		log.Print("Missing required configuration parameter: trash-lifetime")
+		//return ErrNotImplemented
+	}
 	if dirs := strings.Split(value, ","); len(dirs) > 1 {
 		log.Print("DEPRECATED: using comma-separated volume list.")
 		for _, dir := range dirs {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list