Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fix slave provisioning errors #267
Conversation
...ugin/src/main/java/com/github/kostyasha/yad/commons/DockerPullImage.java
Outdated
Show resolved
Hide resolved
...ugin/src/main/java/com/github/kostyasha/yad/commons/DockerPullImage.java
Outdated
Show resolved
Hide resolved
...ugin/src/main/java/com/github/kostyasha/yad/commons/DockerPullImage.java
Outdated
Show resolved
Hide resolved
| @@ -199,17 +198,9 @@ protected boolean shouldPullImage(DockerClient client, String imageName) { | |||
| return false; | |||
| } | |||
|
|
|||
| List<Image> images = client.listImagesCmd().exec(); | |||
| List<Image> images = client.listImagesCmd().withImageNameFilter(fullImageName).exec(); | |||
KostyaSha
Jul 18, 2019
Owner
now it's missing docker.io prefix check
now it's missing docker.io prefix check
bhuisgen
Jul 18, 2019
Author
Is it really useful to check that ? Doing it will force to inspect all images without filtering which will crash with the 1MB (or 3MB) output exception.
Is it really useful to check that ? Doing it will force to inspect all images without filtering which will crash with the 1MB (or 3MB) output exception.
KostyaSha
Jul 18, 2019
Owner
When i were initially implementing docker had this prefix for images, without it image search didn't work.
When i were initially implementing docker had this prefix for images, without it image search didn't work.
KostyaSha
Jul 18, 2019
Owner
I not sure how filter works, it happens on daemon side, maybe it's dealing with this nuance
I not sure how filter works, it happens on daemon side, maybe it's dealing with this nuance
KostyaSha
Jul 18, 2019
Owner
Well, here you can have filter (i hope it returns images with docker.io and without), but on results list you may not remove check
Well, here you can have filter (i hope it returns images with docker.io and without), but on results list you may not remove check
KostyaSha
Jul 18, 2019
Owner
$ docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:2374:2374 bobrik/socat TCP-LISTEN:2374,fork UNIX-CONNECT:/var/run/docker.sock
3945abd2b12dd549e30e285bebd0553223b84f58f1919e8af9dbac9c45185dda
$ docker pull docker.io/nginx:latest
latest: Pulling from library/nginx
0a4690c5d889: Pull complete
9719afee3eb7: Pull complete
44446b456159: Pull complete
Digest: sha256:b4b9b3eee194703fc2fa8afa5b7510c77ae70cfba567af1376a573a967c03dbb
Status: Downloaded newer image for nginx:latest
Though http://127.0.0.1:2374/v1.16/images/json doesn't show prefix. Probably prefix appears when daemon has private registry images.
$ docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:2374:2374 bobrik/socat TCP-LISTEN:2374,fork UNIX-CONNECT:/var/run/docker.sock
3945abd2b12dd549e30e285bebd0553223b84f58f1919e8af9dbac9c45185dda
$ docker pull docker.io/nginx:latest
latest: Pulling from library/nginx
0a4690c5d889: Pull complete
9719afee3eb7: Pull complete
44446b456159: Pull complete
Digest: sha256:b4b9b3eee194703fc2fa8afa5b7510c77ae70cfba567af1376a573a967c03dbb
Status: Downloaded newer image for nginx:latest
Though http://127.0.0.1:2374/v1.16/images/json doesn't show prefix. Probably prefix appears when daemon has private registry images.
37c5c79
to
7ea9d3d
...ugin/src/main/java/com/github/kostyasha/yad/commons/DockerPullImage.java
Outdated
Show resolved
Hide resolved
7ea9d3d
to
b862832

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

This PR attempts to fix the problem of slave provisioning errors on a swarm cluster with a lot of images and/or containers.
Instead of inspecting all existing cluster resources, a docker tag and filter are used to list only the needed resources.
Issue: #249 + docker-java/docker-java#977