Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman import failed with Digest did not match error #10854

Closed
babykart opened this issue Jul 3, 2021 · 6 comments
Closed

podman import failed with Digest did not match error #10854

babykart opened this issue Jul 3, 2021 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@babykart
Copy link

babykart commented Jul 3, 2021

This a BUG REPORT

/kind bug

Description

podman-3.2.{1,2} failed to import an archive.

Steps to reproduce the issue:

wget https://mirror.init7.net/gentoo/releases/amd64/autobuilds/current-stage3-amd64-hardened+nomultilib/stage3-amd64-hardened+nomultilib-20210630T214504Z.tar.xz
xzcat stage3-amd64-hardened+nomultilib-20210630T214504Z.tar.xz | bzip2 | podman import - kubler-gentoo/stage3-amd64-hardened-nomultilib:20210630T214504Z

Describe the results you received:

Getting image source signatures
Copying blob ceeec99a2999 .
Error: Error reading blob sha256:ceeec99a2999787411bcb9e9a81d473091dc6d7c08757237b4dcb9bcbfd7251f: Digest did not match, expected sha256:ceeec99a2999787411bcb9e9a81d473091dc6d7c08757237b4dcb9bcbfd7251f, got sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Describe the results you expected:

Getting image source signatures
Copying blob ceeec99a2999 done
Copying config f236e783f5 done
Writing manifest to image destination
Storing signatures
f236e783f5aeb284df81fd98d5837fcb954b94f46ddbdf9057e1bf1f70b6ac85

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      3.2.2
API Version:  3.2.2
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: 'conmon: /usr/bin/conmon'
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 4
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: journald
  hostname: rossak
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.8.0-1035-aws
  linkmode: dynamic
  memFree: 2351464448
  memTotal: 16788611072
  ociRuntime:
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version 0.20.1.5-925d-dirty
      commit: 0d42f1109fd73548f44b01b3e84d04a279e99d2e
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: true
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 671h 54m 14.63s (Approximately 27.96 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /vol/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 186
  runRoot: /run/containers/storage
  volumePath: /vol/containers/storage/volumes
version:
  APIVersion: 3.2.2
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.15.2
  OsArch: linux/amd64
  Version: 3.2.2

Package info (e.g. output of rpm -q podman or apt list podman):

podman/unknown,now 100:3.2.2-1 amd64 [installed]
podman/unknown 100:3.2.2-1 arm64
podman/unknown 100:3.2.2-1 armhf
podman/unknown 100:3.2.2-1 s390x

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

I tried 3.2.X under Gentoo : same error.
3.1.2 works as expected.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 3, 2021
@vrothberg vrothberg self-assigned this Jul 6, 2021
@vrothberg
Copy link
Member

Thanks for the report. I am looking into this.

vrothberg added a commit to vrothberg/common that referenced this issue Jul 6, 2021
When importing, first create the image and tag it afterwards.  This also
makes sure that an imported image *without* a tag is correctly listed as
"<none>".  Previously, such images were tagged as
"docker.io/library/sha256:$ID" (inherited from older Podman code).

Context: containers/podman/issues/10854
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member

Opened containers/common#669 to fix the issue.

vrothberg added a commit to vrothberg/common that referenced this issue Jul 7, 2021
When importing, first create the image and tag it afterwards.  This also
makes sure that an imported image *without* a tag is correctly listed as
"<none>".  Previously, such images were tagged as
"docker.io/library/sha256:$ID" (inherited from older Podman code).

Context: containers/podman/issues/10854
Signed-off-by: Valentin Rothberg <[email protected]>
vrothberg added a commit to vrothberg/libpod that referenced this issue Jul 8, 2021
* libimage: import: fix tags
* Don't use systemd defaults if /proc/1/comm != systemd

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1979497
Fixes: containers/issues/10854
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member

This has been fixed and will be released with Podman v3.2.3 and v3.3.0.

@babykart
Copy link
Author

@vrothberg I tried 3.2.3 but it isn't fix the problem.
Now I don't have error message but the result image is empty:

3.2.3:

Getting image source signatures
Copying blob e3b0c44298fc done
Copying config 4c17b62dd9 done
Writing manifest to image destination
Storing signatures
sha256:ad8d30dbb5cc8c1c93d668cc6688f0301179270a3e19fc58c1c4f77a55604b31
podman images
localhost/kubler-gentoo/stage3-amd64-hardened-nomultilib  latest            ad8d30dbb5cc  2 minutes ago      1.09 kB

3.1.2:

Getting image source signatures
Copying blob ceeec99a2999 done
Copying config e08265be09 done
Writing manifest to image destination
Storing signatures
e08265be09ba19106937104d11f71a3927d1b031584b4ed0522883fcf8232b9d
podman images
localhost/kubler-gentoo/stage3-amd64-hardened-nomultilib  latest            e08265be09ba  4 minutes ago       905 MB

It appears to be relative to the size of the archive because if I try a smaller archive, it works perfectly with 3.2.X

@vrothberg
Copy link
Member

Thanks for checking, @babykart. Would you open a new issue for that? Seems like there's more behind.

@babykart
Copy link
Author

#10994

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants