containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.95k stars 2.43k forks source link

kubic repo: "Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=devel_kubic_libcontainers_stable" #7880

Closed philnalwalker closed 4 years ago

philnalwalker commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When building a Dockerfile using FROM amazonlinux following the exact instructions on https://podman.io/getting-started/installation podman fails to install. I did try adding yum --enablerepo=devel_kubic_libcontainers_stable to the Dockerfile per the error message with no success.

Steps to reproduce the issue:

  1. Create the following Dockerfile
FROM amazonlinux

USER root

RUN curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo \
    && yum -y install yum-plugin-copr \
    && yum -y copr enable lsm5/container-selinux \
    && yum -y install podman
  1. Try to build it
docker build .

Describe the results you received:

...

Downloading packages:
warning: /var/cache/yum/x86_64/2/copr:copr.fedorainfracloud.org:lsm5:container-selinux/packages/container-selinux-2.107-3.el7.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID 2e35d101: NOKEY
Public key for container-selinux-2.107-3.el7.noarch.rpm is not installed
warning: /var/cache/yum/x86_64/2/devel_kubic_libcontainers_stable/packages/conmon-2.0.21-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 75060aa4: NOKEY
Public key for conmon-2.0.21-1.el7.x86_64.rpm is not installed
https://download.opensuse.org/repositories/devel%3A/kubic%3A/libcontainers%3A/stable/CentOS_7/x86_64/containernetworking-plugins-0.8.7-1.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=devel_kubic_libcontainers_stable clean metadata
Trying other mirror.
https://download.opensuse.org/repositories/devel%3A/kubic%3A/libcontainers%3A/stable/CentOS_7/x86_64/podman-plugins-2.1.1-4.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=devel_kubic_libcontainers_stable clean metadata
Trying other mirror.
https://download.opensuse.org/repositories/devel%3A/kubic%3A/libcontainers%3A/stable/CentOS_7/x86_64/runc-1.0.0-103.dev.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=devel_kubic_libcontainers_stable clean metadata
Trying other mirror.
https://download.opensuse.org/repositories/devel%3A/kubic%3A/libcontainers%3A/stable/CentOS_7/x86_64/podman-2.1.1-4.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=devel_kubic_libcontainers_stable clean metadata
Trying other mirror.

Error downloading packages:
  2:runc-1.0.0-103.dev.el7.x86_64: [Errno 256] No more mirrors to try.
  containernetworking-plugins-0.8.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
  podman-2.1.1-4.el7.x86_64: [Errno 256] No more mirrors to try.
  podman-plugins-2.1.1-4.el7.x86_64: [Errno 256] No more mirrors to try.

Describe the results you expected:

Docker build to complete successfully.

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

Output of podman version:

(paste your output here)

Output of podman info --debug:

(paste your output here)

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

(paste your output here)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

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

Latest Docker running on MacOS

rhatdan commented 4 years ago

I believe the issue here is that you don't have the extras repo created.

Installation instructions are:

sudo subscription-manager repos --enable=rhel-7-server-extras-rpms sudo yum -y install podman

lsm5 commented 4 years ago

@philnalwalker Just tried this and your exact Dockerfile above worked for me. I suspect this is a mirror issue.

Maybe retry after sometime or check if you can set a mirror explicitly instead of download.opensuse.org. The mirror list at https://mirrors.opensuse.org/list/repositories.html could be useful.

If that doesn't help either, it might help to check with the OBS admins at #opensuse-buildservice on freenode or file a bug at their bugzilla: https://bugzilla.opensuse.org

Closing...

philnalwalker commented 3 years ago

@lsm5

Building using the Dockerfile above used to work for me, around 10/1 it stopped working and has not worked since.

I think the reason it worked for you is you had an older amazonlinux container cached on your system. Can you try a docker system prune -a then building using the Dockerfile I linked above?

I had multiple other people try building this Dockerfile that used to work and it does not work for them either.

I also tried using to separate mirrors as you suggested and still receive the same error listed above.

https://provo-mirror.opensuse.org/ http://plug-mirror.rcac.purdue.edu/opensuse

@rhatdan on amazonlinux 2 the commands to enable the extras are slightly different. I used amazon-linux-extras install epel docker -y I tried this and it did not seem to fix the problem

cwiggs commented 3 years ago

Building using the Dockerfile above used to work for me, around 10/1 it stopped working and has not worked since.

I think the reason it worked for you is you had an older amazonlinux container cached on your system. Can you try a docker system prune -a then building using the Dockerfile I linked above?

Problem with your dockerfile the FROM line doesn't have a version which therefore defaults to the latest tag. So without knowing which version you were actually using we won't be able to reproduce it.

When I pull amazonlinux from docker hub right now I get this digest: sha256:2c99363fc74d3a39f02365b964e73cceb2b2524c00e9977e16680156e2f79ee8 however I can't match that with a digest on docker hub.

according to the readme for the amazonlinux image the latest tag is for version 2.0.20200722.0, which gives me the same error you were getting.

Does anyone have a version number for the amazonlinux image that did work?

around 10/1 it stopped working and has not worked since. It's worth noting that the 2.0.20200722.0 that is latest on docker hub was uploaded on Jul 21 2020, so before Oct 1st.

I'm having a similar issue trying to install buildah on amazon linux 2. I'll reach out to suse as @lsm5 suggested.