Skip to content

Image ID for the same image changes. #2678

@Random-Liu

Description

@Random-Liu
root@lantaol0:~# crictl pull k8s.gcr.io/busybox:1.24
Image is up to date for sha256:ddabeeccc3fa881b831a6dc22831db07d56876dc6f660fd017030bcef0f7de5c
root@lantaol0:~# crictl pull k8s.gcr.io/busybox:1.24
Image is up to date for sha256:9e3bfbcf25238b741dff9d21f446bc06ba122507e8c7950cbb45e356c4970efa
root@lantaol0:~# crictl pull k8s.gcr.io/busybox:1.24
Image is up to date for sha256:9e3bfbcf25238b741dff9d21f446bc06ba122507e8c7950cbb45e356c4970efa
root@lantaol0:~# crictl pull k8s.gcr.io/busybox:1.24
Image is up to date for sha256:9e3bfbcf25238b741dff9d21f446bc06ba122507e8c7950cbb45e356c4970efa
root@lantaol0:~# crictl pull k8s.gcr.io/busybox:1.24
Image is up to date for sha256:9e3bfbcf25238b741dff9d21f446bc06ba122507e8c7950cbb45e356c4970efa

There are 2 problems:

  1. The image id (image config digest) for the same image shouldn't change if the image is not changed. @dmcgowan
  2. After Cache image reference cri#865, cri plugin only generates repotag and repodigest for an image. The repotag -> image mapping can change (e.g. this issue, or the image tag used to tag another image), but we thought repodigest can behave as the unique identifier. So that even the repotag -> image mapping changes, the image will still have a reference. However, I forgot that for schema 1 image, there is no repo digest. So cri plugin should still generate an image id as the unique image reference, which we were doing before 1.2..

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions