[ARVADOS] updated: 2033d7f870dd0e4c65b563d689514fe21e478992

git at public.curoverse.com git at public.curoverse.com
Sun Feb 14 23:18:02 EST 2016


Summary of changes:
 services/crunch-run/crunchrun.go |  8 ++++----
 services/crunch-run/upload.go    | 13 ++++++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)

       via  2033d7f870dd0e4c65b563d689514fe21e478992 (commit)
      from  8499ff832a8b7d072f0ac2dd91e97991ab82579f (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 2033d7f870dd0e4c65b563d689514fe21e478992
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Sun Feb 14 23:17:58 2016 -0500

    8015: Report container UUID in error message.  Uploader fix for empty & zero-length streams.

diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index e90ede6..07436f5 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -656,28 +656,28 @@ func main() {
 
 	api, err := arvadosclient.MakeArvadosClient()
 	if err != nil {
-		log.Fatal(err)
+		log.Fatalf("%s: %v", flag.Arg(0), err)
 	}
 	api.Retries = 8
 
 	var kc *keepclient.KeepClient
 	kc, err = keepclient.MakeKeepClient(&api)
 	if err != nil {
-		log.Fatal(err)
+		log.Fatalf("%s: %v", flag.Arg(0), err)
 	}
 	kc.Retries = 4
 
 	var docker *dockerclient.DockerClient
 	docker, err = dockerclient.NewDockerClient("unix:///var/run/docker.sock", nil)
 	if err != nil {
-		log.Fatal(err)
+		log.Fatalf("%s: %v", flag.Arg(0), err)
 	}
 
 	cr := NewContainerRunner(api, kc, docker, flag.Arg(0))
 
 	err = cr.Run()
 	if err != nil {
-		log.Fatal(err)
+		log.Fatalf("%s: %v", flag.Arg(0), err)
 	}
 
 }
diff --git a/services/crunch-run/upload.go b/services/crunch-run/upload.go
index 3285fcc..23b7c38 100644
--- a/services/crunch-run/upload.go
+++ b/services/crunch-run/upload.go
@@ -187,6 +187,9 @@ func (m *CollectionWriter) ManifestText() (mt string, err error) {
 	m.mtx.Lock()
 	defer m.mtx.Unlock()
 	for _, v := range m.Streams {
+		if len(v.FileStreamSegments) == 0 {
+			continue
+		}
 		k := v.StreamName
 		if k == "." {
 			buf.WriteString(".")
@@ -195,9 +198,13 @@ func (m *CollectionWriter) ManifestText() (mt string, err error) {
 			k = strings.Replace(k, "\n", "", -1)
 			buf.WriteString("./" + k)
 		}
-		for _, b := range v.Blocks {
-			buf.WriteString(" ")
-			buf.WriteString(b)
+		if len(v.Blocks) > 0 {
+			for _, b := range v.Blocks {
+				buf.WriteString(" ")
+				buf.WriteString(b)
+			}
+		} else {
+			buf.WriteString(" d41d8cd98f00b204e9800998ecf8427e+0")
 		}
 		for _, f := range v.FileStreamSegments {
 			buf.WriteString(" ")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list