Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-68539

Image digest value is different between podman 4.x and 5.x

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • podman
    • None
    • Yes
    • Moderate
    • rhel-sst-container-tools
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      The digest value returned from a container image isn't the same that it used to be with podman 4.x and from the container configuration

      What is the impact of this issue to you?

      The containerized Ansible Automation Platform (AAP) installer leverages podman to deploy services.
      In order, to restart services when container images changed we compare digest from the image and the existing container.
      At the moment, with podman 5, services are always restarted even if the image didn't change. We don't see this with podman 4

      Please provide the package NVR for which the bug is seen:

      $ rpm -q podman
      podman-5.2.2-9.el9_5.x86_64

      How reproducible is this bug?:

      100% reproducible

      Steps to reproduce

      1. dnf install podman -y
      2. podman pull registry.redhat.io/rhel8/postgresql-15:latest
      3. podman container create --name postgresql registry.redhat.io/rhel8/postgresql-15:latest
      4. podman image inspect registry.redhat.io/rhel8/postgresql-15:latest
      5. podman container inspect postgresql

      Expected results

      With podman 4.x (4.9.4 from RHEL 9.4), digests are the same between the image and the container

      $ podman image inspect registry.redhat.io/rhel8/postgresql-15:latest | jq -r .[].Digest
      sha256:4066e378a1a8bc14ed19dbdc016a669d3476021a640ec225c022d9044d7e9241
      $ podman container inspect postgresql | jq -r .[].ImageDigest
      sha256:4066e378a1a8bc14ed19dbdc016a669d3476021a640ec225c022d9044d7e9241
      

      Actual results

      With podman 5.x, digests aren't the same between the image and the container

      $ podman image inspect registry.redhat.io/rhel8/postgresql-15:latest | jq -r .[].Digest
      sha256:1fd94a3b154183ee3087027c058d637e7088fd2c2a279fce2384cc9346e200f4
      $ podman container inspect postgresql | jq -r .[].ImageDigest
      sha256:4066e378a1a8bc14ed19dbdc016a669d3476021a640ec225c022d9044d7e9241
      

      Note that using the image ID returns the right value under podman 5

      $ podman image inspect 19ed88cec4bb | jq -r .[].Digest
      sha256:4066e378a1a8bc14ed19dbdc016a669d3476021a640ec225c022d9044d7e9241
      

              rhn-engineering-mitr Miloslav Trmač
              dsavinea@redhat.com Dimitri Savineau
              Container Runtime Eng Bot Container Runtime Eng Bot
              Container Runtime Bugs Bot Container Runtime Bugs Bot
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: