Project

General

Profile

Actions

Bug #12467

closed

crunch-run not waiting for Docker image to finish loading.

Added by Peter Amstutz over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-

Description

It is failing to load Docker image, even though the image load seemingly succeeds:

2017-10-19T16:41:46.528938874Z Fetching Docker image from collection '997e3bc9579153e723b599b300d9123d+342'
2017-10-19T16:41:46.549138991Z Using Docker image id 'sha256:20a23446d37fac4cb2ec6462310aaee7119f4594948765a3397b13f9baec4812'
2017-10-19T16:41:46.549599576Z Loading Docker image from keep
2017-10-19T16:41:49.814403711Z Creating Docker container
2017-10-19T16:41:49.816658048Z While creating container: Error: No such image: sha256:20a23446d37fac4cb2ec6462310aaee7119f4594948765a3397b13f9baec4812

It seems that loading is asynchronous, the ImageLoad method returns after the data has been transmitted but before the layers have been decompressed. We need to wait for a response indicating that loading is finished.


Subtasks 1 (0 open1 closed)

Task #12468: Review 12467-read-imgload-responseResolvedTom Clegg10/19/2017Actions
Actions #1

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz over 6 years ago

  • Status changed from New to In Progress
  • Assigned To set to Peter Amstutz

12467-read-imgload-response @ d64215e8f0057cc7b4c6295932bc7f44d27a1eb5

Actions #3

Updated by Tom Clegg over 6 years ago

Better form to do "defer response.Body.Close()" before ioutil.ReadAll(), so it gets closed even if read fails.

I think the error message has copy-paste-itis: "While reading response to container image into Docker: %v"

I'm guessing it means "error reading response from docker.ImageLoad: %v"

You don't need to say string(rbody) -- %s prints a []byte as a string.

Actions #4

Updated by Peter Amstutz over 6 years ago

Tom Clegg wrote:

Better form to do "defer response.Body.Close()" before ioutil.ReadAll(), so it gets closed even if read fails.

I think the error message has copy-paste-itis: "While reading response to container image into Docker: %v"

I'm guessing it means "error reading response from docker.ImageLoad: %v"

You don't need to say string(rbody) -- %s prints a []byte as a string.

All fixed, plus a bonus fix log.Printf -> runner.CrunchLog.Printf

12467-read-imgload-response @ a976b02dc7ecba18277aceeaf086ab76fe4bf3f0

Actions #5

Updated by Tom Clegg over 6 years ago

LGTM

Actions #6

Updated by Anonymous over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:6fd6ddcebda57df4ecb2303dc229420c2c13af7b.

Actions

Also available in: Atom PDF