kubernetes: container statuses contain wrong/misleading image tag

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

When multiple tags of an image share the same SHA256 digest the value status.containerStatuses[].image might return the wrong image tag. Unfortunately docker inspect doesn’t include the tag that was used to create the container either so this might actually be a bug in docker?

What you expected to happen:

status.containerStatuses[].image contains the same tag as specified in spec.containers[].image

How to reproduce it (as minimally and precisely as possible):

  • Create an image named test:staging and re-tag it as test:production.
  • You now have 2 images with the same name and digest but different tags.
  • Start 2 pods: one using test:staging and the other test:production as image.
  • The container status for both pods will state that the same image tag was used to create the container which is at least misleading. Although it doesn’t really make a difference as both image tags share the same digest it is technically wrong.

Anything else we need to know?:

This should imho be considered for #46255.

Environment:

  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T07:00:21Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T06:43:48Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration**: self-hosted cluster
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.3 LTS (Xenial Xerus)
  • Kernel (e.g. uname -a): Linux atgrzsl1751 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: custom ansible playbook
  • Others: Docker version: docker.io (1.12.6-0ubuntu1~16.04.1)

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 19
  • Comments: 29 (5 by maintainers)

Commits related to this issue

Most upvoted comments

we observe same issue, reproducible on microk8s 1.17