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 <andrewpilloud@igneoussystems.com>
This commit is contained in:
parent
9d3c442b7b
commit
9499a1a537
1 changed files with 0 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue