[ARVADOS] updated: c7b4e4802762eada81652224878a74b538a1d704

git at public.curoverse.com git at public.curoverse.com
Tue Sep 22 10:43:12 EDT 2015


Summary of changes:
 services/datamanager/keep/keep.go | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

       via  c7b4e4802762eada81652224878a74b538a1d704 (commit)
      from  0219fab6b0eb8b4710af2ae03c5231bf4d932a28 (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 c7b4e4802762eada81652224878a74b538a1d704
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 22 10:38:26 2015 -0400

    7162: Update datamanager code to ask for all non-proxy typed keep services and fail if any non-disk types are found in the returned list.
    This needs to be enhanced when we are ready to support keep servers with other service types sub as blob storage.

diff --git a/services/datamanager/keep/keep.go b/services/datamanager/keep/keep.go
index 5b855dc..86c2b08 100644
--- a/services/datamanager/keep/keep.go
+++ b/services/datamanager/keep/keep.go
@@ -23,10 +23,11 @@ import (
 
 // ServerAddress struct
 type ServerAddress struct {
-	SSL  bool   `json:service_ssl_flag`
-	Host string `json:"service_host"`
-	Port int    `json:"service_port"`
-	UUID string `json:"uuid"`
+	SSL         bool   `json:service_ssl_flag`
+	Host        string `json:"service_host"`
+	Port        int    `json:"service_port"`
+	UUID        string `json:"uuid"`
+	ServiceType string `json:"service_type"`
 }
 
 // BlockInfo is info about a particular block returned by the server
@@ -104,7 +105,7 @@ func GetKeepServersAndSummarize(params GetKeepServersParams) (results ReadServer
 // GetKeepServers from api server
 func GetKeepServers(params GetKeepServersParams) (results ReadServers) {
 	sdkParams := arvadosclient.Dict{
-		"filters": [][]string{[]string{"service_type", "=", "disk"}},
+		"filters": [][]string{[]string{"service_type", "!=", "proxy"}},
 	}
 	if params.Limit > 0 {
 		sdkParams["limit"] = params.Limit
@@ -118,6 +119,14 @@ func GetKeepServers(params GetKeepServersParams) (results ReadServers) {
 			fmt.Sprintf("Error requesting keep disks from API server: %v", err))
 	}
 
+	// Currently, only "disk" types are supported. Stop if any other service types are found.
+	for _, server := range sdkResponse.KeepServers {
+		if server.ServiceType != "disk" {
+			loggerutil.FatalWithMessage(params.Logger,
+				fmt.Sprintf("Unsupported service type %q found for: %v", server.ServiceType, server))
+		}
+	}
+
 	if params.Logger != nil {
 		params.Logger.Update(func(p map[string]interface{}, e map[string]interface{}) {
 			keepInfo := logger.GetOrCreateMap(p, "keep_info")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list