[ARVADOS] updated: 149eb0dabca09332dfd9a89cba4c6697e3c6c65d

git at public.curoverse.com git at public.curoverse.com
Mon Mar 2 13:37:20 EST 2015


Summary of changes:
 sdk/cli/bin/crunch-job            | 90 ++++++++++++++++++++++++---------------
 services/keepstore/pull_worker.go | 12 +++---
 2 files changed, 61 insertions(+), 41 deletions(-)

       via  149eb0dabca09332dfd9a89cba4c6697e3c6c65d (commit)
       via  32a14171e8fe873d53effe87b9bac83aff1a2a60 (commit)
       via  62fea2a463eb0d8c3aef84a56ba84561a196666b (commit)
       via  679e083df15373a6570b0834bf2e95237a040dc7 (commit)
       via  0e4de53ab1c26a83a5f542d52935358497959c3e (commit)
       via  eab3fd07f8f2eea43a373454a91ba0ca3fc60a6b (commit)
      from  afd38976a33c46b618ff9317192388b8f3f1a195 (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 149eb0dabca09332dfd9a89cba4c6697e3c6c65d
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Mar 2 13:37:04 2015 -0500

    3761: use SignLocator

diff --git a/services/keepstore/pull_worker.go b/services/keepstore/pull_worker.go
index b68e933..5082897 100644
--- a/services/keepstore/pull_worker.go
+++ b/services/keepstore/pull_worker.go
@@ -9,7 +9,6 @@ import (
 	"io/ioutil"
 	"log"
 	"os"
-	"strconv"
 	"time"
 )
 
@@ -83,11 +82,10 @@ func Pull(addr string, locator string) (err error) {
 // Fetch the content for the given locator using keepclient.
 var GetContent = func(addr string, locator string) ([]byte, error) {
 	// Generate signature with a random token
-	expires_at := time.Now().Unix() + 60 // now + 1 min in seconds
-	hints := "+A" + GenerateRandomApiToken() + "@" + strconv.FormatInt(expires_at, 16)
-	signature := keepclient.MakeLocator2(locator, hints)
-
-	reader, blocklen, _, err := keepClient.AuthorizedGet(locator, signature.Signature, signature.Timestamp)
+	PermissionSecret = []byte(os.Getenv("ARVADOS_API_TOKEN"))
+	expires_at := time.Now().Add(60 * time.Second)
+	signedLocator := SignLocator(locator, GenerateRandomApiToken(), expires_at)
+	reader, blocklen, _, err := keepClient.Get(signedLocator)
 	defer reader.Close()
 	if err != nil {
 		return nil, err
@@ -100,7 +98,7 @@ var GetContent = func(addr string, locator string) ([]byte, error) {
 	}
 
 	if (read_content == nil) || (int64(len(read_content)) != blocklen) {
-		return nil, errors.New(fmt.Sprintf("Content not found for: %s/%s", addr, locator))
+		return nil, errors.New(fmt.Sprintf("Content not found for: %s", signedLocator))
 	}
 
 	return read_content, nil

commit 32a14171e8fe873d53effe87b9bac83aff1a2a60
Merge: afd3897 62fea2a
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Fri Feb 27 14:27:55 2015 -0500

    Merge branch 'master' into 3761-pull-list-worker


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list