[ARVADOS] created: 1.1.0-47-g70dd2b6

Git user git at public.curoverse.com
Thu Oct 19 13:36:26 EDT 2017


        at  70dd2b69a796db27e376ae92a20f236f93670f67 (commit)


commit 70dd2b69a796db27e376ae92a20f236f93670f67
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.

diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index b1d3671..2c0f92a 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -256,10 +256,20 @@ 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)
+		dump, _ := os.Create(fmt.Sprint("/tmp/dump", time.Now().UTC()))
+		io.Copy(dump, readCloser)
+		dump.Close()
+		readCloser, err = runner.Kc.ManifestFileReader(manifest, img)
+
+		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