Skip to content

Commit

Permalink
Merge pull request #3216 from yinyic/cached_image_error
Browse files Browse the repository at this point in the history
Add log message when receiving error during cached image inspection
  • Loading branch information
yinyic authored May 19, 2022
2 parents 4ba4341 + 2e6e265 commit 23c5d34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/engine/docker_task_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,12 @@ func (engine *DockerTaskEngine) imagePullRequired(imagePullBehavior config.Image
// by inspecting the image.
_, err := engine.client.InspectImage(container.Image)
if err != nil {
logger.Info("Image inspect returned error, going to pull image for container", logger.Fields{
field.TaskID: taskId,
field.Container: container.Name,
field.Image: container.Image,
field.Error: err.Error(),
})
return true
}
logger.Info("Found cached image, use it directly for container", logger.Fields{
Expand Down

0 comments on commit 23c5d34

Please sign in to comment.