From 2e6e265c353d63ebfc789f269b10be2027eab8e0 Mon Sep 17 00:00:00 2001 From: Yinyi Chen Date: Thu, 19 May 2022 09:30:18 -0700 Subject: [PATCH] Add log when receiving error during cached image inspection --- agent/engine/docker_task_engine.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/engine/docker_task_engine.go b/agent/engine/docker_task_engine.go index 69d1e2d0d41..044d5b65dd5 100644 --- a/agent/engine/docker_task_engine.go +++ b/agent/engine/docker_task_engine.go @@ -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{