Description of problem: `oc adm release new` failed with error when use an existing multi-arch release image as input Version-Release number of selected component (if applicable): oc version --client Client Version: 4.11.0-0.nightly-2022-06-14-032134 Kustomize Version: v4.5.4 How reproducible: always Steps to Reproduce: 1. check the multi-arch release image infomation: oc image info quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations. error: the image is a manifest list and contains multiple images - use --filter-by-os to select from: OS DIGEST linux/amd64 sha256:1bff94be38f1f93bca31ce61706d568b1ab06da42fd6862037abb811c82ce0e3 linux/ppc64le sha256:af296a9b444ad52e21a7d2d66ea7033140fe10fd6e68bd5cd915c7b30c91c981 linux/s390x sha256:06b459db5aaf326d04a15b64e1f91643ed4f5d5860d6d8c68d7308806c5433c2 linux/arm64 sha256:0a3b9ef940219f60df2c5e0aca188c7076ce947a7c42353c5547bcc640ee2696 2.Use `oc adm release new` with an existing multi-arch release image as input: `oc adm release new --keep-manifest-list --from-release=quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db --to-image=localhost:5000/newtest --keep-manifest-list` Actual results: 2. failed with error: oc adm release new --keep-manifest-list --from-release=quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db --to-image=localhost:5000/newtest --keep-manifest-list Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations. error: unable to parse image quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db: unknown image manifest of type *manifestlist.DeserializedManifestList from manifest sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db Expected results: 2. no error. Additional info:
Ying Zhou when working with this, the error you'll see initially which will tell you to specify `--to-image-base` is caused from the fact that a wrong (unavailable) image is most likely being put as the base image for the release. At least that's what I found when going through all the metadata of the image I was using as the base. After passing `--to-image-base` with the same image as `--from-release` it worked just fine.
will hit error now, is this expected ? oc version --client Client Version: 4.11.0-0.nightly-2022-06-23-092832 Kustomize Version: v4.5.4 oc image info quay.io/openshift-release-dev/ocp-release@sha256:c2407b309810f7bcbe7155a318ecdcdc7e54f02ca9b3618e39605869e302b6ae Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations. error: the image is a manifest list and contains multiple images - use --filter-by-os to select from: OS DIGEST linux/amd64 sha256:e494ef7a7f94457159e1a063292fac3a7ae44032d73c087d520255b218497d26 linux/ppc64le sha256:a051b78833502caf3dfe20453c63f78193428969b58a785c21348e18b43b891a linux/s390x sha256:d4e8010ccf1ad60a862db5d833f8dfe57380c11aad15ae9cd5985c5aca69e9bc linux/arm64 sha256:7f995d8b9c7f7c1d9943e0a406f52c38fbc1df457e86f411439b9eb3f017e192 oc adm release new --keep-manifest-list --from-release=quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db --to-image=localhost:5000/newtest --keep-manifest-list Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations. W0623 20:37:27.505504 76194 manifest.go:442] Chose linux/amd64 manifest from the manifest list. error: unable to find an image within the release that matches the base image manifest "sha256:d86edb7bc7f38061d134c3101d0f50c34cbba4e7d8db9bebc259b00d00e631a8", please specify --to-image-base
Yes, see #comment 1
with the --to-image-base as workaround , the issue has fixed: oc adm release new --keep-manifest-list --from-release=quay.io/openshift-release-dev/ocp-release@sha256:539fc5f98ea138395595fc72e9764aff3ad370803745b4d22db7df8e21d530db --to-image=localhost:5000/newtest --to-image-base file://openshift/release:4.10.18-x86_64-cluster-version-operator --insecure .... info: Pushed to localhost:5000/newtest sha256:da853b003b49b184ab528ff35366e8c3fb8f91a25074aa60a1ca56fa6aabf8a8 4.11.0-0.nightly-multi-2022-06-14-102108 2022-06-24T02:59:47Z [root@localhost mirrortest]# echo $? 0 [root@localhost mirrortest]# oc image info localhost:5000/newtest --insecure Warning: the default reading order of registry auth file will be changed from "${HOME}/.docker/config.json" to podman registry config locations in the future version of oc. "${HOME}/.docker/config.json" is deprecated, but can still be used for storing credentials as a fallback. See https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md for the order of podman registry config locations. Name: localhost:5000/newtest:4.11.0-0.nightly-multi-2022-06-14-102108 Digest: sha256:da853b003b49b184ab528ff35366e8c3fb8f91a25074aa60a1ca56fa6aabf8a8 Media Type: application/vnd.docker.distribution.manifest.v2+json Created: 5m ago ....
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069