From 9499a1a5377ee2b9537d990289b483d0193ef87f Mon Sep 17 00:00:00 2001 From: Andrew Pilloud Date: Thu, 9 Nov 2017 08:30:24 -0800 Subject: [PATCH] server: Do not suppress image repull in cri-o The PullImage function is trying to be too smart and as a result suppressing pulls where the imagePullPolicy is Always. This policy is not plumbed down and so we must trust the upper layers to do this check. This matches the behavior of docker, which does repull if the tag has changed. We must rely on the lower layers to not redownload an image already in the cache. Signed-off-by: Andrew Pilloud --- server/image_pull.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/server/image_pull.go b/server/image_pull.go index 26d08912..dd4fb711 100644 --- a/server/image_pull.go +++ b/server/image_pull.go @@ -66,14 +66,6 @@ func (s *Server) PullImage(ctx context.Context, req *pb.PullImageRequest) (*pb.P continue } - // let's be smart, docker doesn't repull if image already exists. - _, err = s.StorageImageServer().ImageStatus(s.ImageContext(), img) - if err == nil { - logrus.Debugf("image %s already in store, skipping pull", img) - pulled = img - break - } - _, err = s.StorageImageServer().PullImage(s.ImageContext(), img, options) if err != nil { logrus.Debugf("error pulling image %s: %v", img, err)