[ARVADOS] created: 1.1.0-48-ga976b02

Git user git at public.curoverse.com
Thu Oct 19 14:03:29 EDT 2017


        at  a976b02dc7ecba18277aceeaf086ab76fe4bf3f0 (commit)


commit a976b02dc7ecba18277aceeaf086ab76fe4bf3f0
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Oct 19 13:59:24 2017 -0400

    12467: Fix log messages.  Defer response.Body.Close().
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index c4e1859..1665742 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -260,12 +260,13 @@ func (runner *ContainerRunner) LoadImage() (err error) {
 		if err != nil {
 			return fmt.Errorf("While loading container image into Docker: %v", err)
 		}
+
+		defer response.Body.Close()
 		rbody, err := ioutil.ReadAll(response.Body)
 		if err != nil {
-			return fmt.Errorf("While reading response to container image into Docker: %v", err)
+			return fmt.Errorf("Reading response to image load: %v", err)
 		}
-		log.Printf("Docker response: %v", string(rbody))
-		response.Body.Close()
+		runner.CrunchLog.Printf("Docker response: %s", rbody)
 	} else {
 		runner.CrunchLog.Print("Docker image is available")
 	}

commit 4557160adb2a68c3462fb339f49900d14a271112
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Oct 19 13:35:23 2017 -0400

    12467: Wait for response that image loading is complete
    
    Need to do this before trying to start container.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index b1d3671..c4e1859 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -256,10 +256,15 @@ func (runner *ContainerRunner) LoadImage() (err error) {
 			return fmt.Errorf("While creating ManifestFileReader for container image: %v", err)
 		}
 
-		response, err := runner.Docker.ImageLoad(context.TODO(), readCloser, false)
+		response, err := runner.Docker.ImageLoad(context.TODO(), readCloser, true)
 		if err != nil {
 			return fmt.Errorf("While loading container image into Docker: %v", err)
 		}
+		rbody, err := ioutil.ReadAll(response.Body)
+		if err != nil {
+			return fmt.Errorf("While reading response to container image into Docker: %v", err)
+		}
+		log.Printf("Docker response: %v", string(rbody))
 		response.Body.Close()
 	} else {
 		runner.CrunchLog.Print("Docker image is available")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list