unable to delete docker image with multiple tags on same id #15760
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/driver/docker
type/bug
Milestone
Nomad version
Nomad v1.4.3 (f464aca)
Operating system and Environment details
Debian Bullseye (11)
Issue
Hello !
When a job is deployed with a different image tag pointing to the same digest (two tags, one image), Docker driver is unable to delete the previous image later on.
Ex :
Nomad logs shows
Image
21cccefce913
is no longer in use but because we're trying to delete using the image ID, we encounter a conflict here :nomad/drivers/docker/coordinator.go
Lines 332 to 335 in 0af4762
But 409 only means
conflict
(https://docs.docker.com/engine/api/v1.23/#remove-an-image)Reproduction steps
Deploying a simple job with Alpine
alpine:3.16
thenalpine:3.16.3
thenalpine:3.17
(at the moment I write this issue) should create the same bug as3.16
and3.16.3
point to the same digestb2774aff8c30
Expected Result
The image is deleted even if two tags are on the same digest.
Actual Result
The client node keeps growing as this bug is reproduced a lot with some monorepo projects.
To successfully delete my images, I must keep a cron with
Thank you !
The text was updated successfully, but these errors were encountered: