Commit Graph

17 Commits

Author SHA1 Message Date
Justen Walker
e77d8a59eb driver/docker: pull image with digest
GH #4290

Add digest support to the docker driver image config. This commit
factors out some common code to print the repo:tag (dockerImageRef) for
events/logs as well as parsing the image to retreive the repo,tag
(parseDockerImage) so that the results are consistent/sane for both
repo:tag and repo@sha256:... references.

When pulling an image with a digest, the tag is blank and the repo
contains the digest. See:
https://github.com/fsouza/go-dockerclient/blob/master/image_test.go#L471
2018-05-14 10:42:58 -04:00
Nick Ethier
fdef36ae38 client/driver: remove unused const 'dockerPullProgressEmitInterval' 2018-05-07 16:24:48 -04:00
Nick Ethier
6337f8e32e client/driver: add seperate handler for emitting pull progress 2018-05-07 12:17:34 -04:00
Nick Ethier
9ea3080343 client/driver: remove pull timeout due to race condition that can lead to unexpected timeouts
If two jobs are pulling the same image simultaneously, which ever starts the pull first will set the pull timeout.
This can lead to a poor UX where the first job requested a short timeout while the second job requested a longer timeout
causing the pull to potentially timeout much sooner than expected by the second job.
2018-05-07 12:18:11 -04:00
Nick Ethier
6fb6ecdff6 client/driver: do accounting on layer pull progress 2018-05-07 12:17:53 -04:00
Nick Ethier
c44db4ce79 client/driver: emit progress to all allocs pulling same image 2018-05-07 12:17:34 -04:00
Nick Ethier
77d57e8276 client/driver: add image pull progress monitoring 2018-05-07 12:17:38 -04:00
Josh Soref
98b6dd5cae spelling: safety 2018-03-11 18:52:54 +00:00
Josh Soref
e4d4b94040 spelling: retrieved 2018-03-11 18:51:40 +00:00
Josh Soref
c674ba4231 spelling: cancelled 2018-03-11 17:45:47 +00:00
Josh Soref
10ebc09390 spelling: cancelable 2018-03-11 17:45:34 +00:00
Luke Farnell
7a56971508 fixed all spelling mistakes for goreport 2017-08-07 17:13:05 -04:00
Alex Dadgar
564367fa71 Proper reference counting through task restarts
This PR fixes an issue in which the reference count on a Docker image
would become inflated through task restarts.
2017-03-25 17:05:53 -07:00
Alex Dadgar
8e6d77ebd5 Fix caching of pull future 2017-02-28 18:19:13 -08:00
Alex Dadgar
90cd50b597 Delete on increment and add a safety guard 2017-02-27 20:23:21 -08:00
Alex Dadgar
14074d8ff7 Fix delete future 2017-02-27 19:09:13 -08:00
Alex Dadgar
27b2c677c0 Docker Image Coordinator
This PR introduces a coordinator for doing CRUD on a Docker image. It
should fix racy deletion of images. The issue before was images would be
deleted between prestart and start causing an error.
2017-02-24 13:20:40 -08:00