Description of problem: OPM fails to deprecate bundles even when they are present in the index Version-Release number of selected component (if applicable): OPM v1.16.1 How reproducible: Can be reproduced Steps to Reproduce: 1. opm index deprecatetruncate --generate --binary-image registry.redhat.io/openshift4/ose-operator-registry:v4.6 --from-index registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 --bundles registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4 --container-tool podman 2. 3. Actual results: The operation fails with the message `Error: error deprecating bundle registry.stage.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3: Bundle Image not in database` Expected results: The bundles should be deprecated successfully Additional info: The issue is that by the time it reaches the bundle starting with `5ee` it has been deprecated because the first bundle in the list has a higher version.
This fix is merged upstream and will be resolved in master as soon as the downstream branch pulls in these commits.
Looks like now it tries to deprecate the bundle, however, another error message was thrown, is that expected Ankita? ./bin/opm version 1 ↵ Version: version.Version{OpmVersion:"v1.17.5", GitCommit:"60727603", BuildDate:"2021-07-16T11:56:47Z", GoOs:"linux", GoArch:"386"} ./bin/opm index deprecatetruncate --generate --binary-image registry.redhat.io/openshift4/ose-operator-registry:v4.6 --from-index registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 --bundles registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4 --container-tool podman INFO[0000] deprecating bundles from the index bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0000] Pulling previous image registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 to get metadata bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0000] running /usr/bin/podman pull registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" ERRO[0000] Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6... Get "https://registry-proxy.engineering.redhat.com/v2/": dial tcp: lookup registry-proxy.engineering.redhat.com: no such host Error: Error initializing source docker://registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6: error pinging docker registry registry-proxy.engineering.redhat.com: Get "https://registry-proxy.engineering.redhat.com/v2/": dial tcp: lookup registry-proxy.engineering.redhat.com: no such host bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" Error: error pulling image: Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6... Get "https://registry-proxy.engineering.redhat.com/v2/": dial tcp: lookup registry-proxy.engineering.redhat.com: no such host Error: Error initializing source docker://registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6: error pinging docker registry registry-proxy.engineering.redhat.com: Get "https://registry-proxy.engineering.redhat.com/v2/": dial tcp: lookup registry-proxy.engineering.redhat.com: no such host . exit status 125 Usage: opm index deprecatetruncate [flags] Flags: -i, --binary-image opm container image for on-image opm command -u, --build-tool string tool to build container images. One of: [docker, podman]. Defaults to podman. Overrides part of container-tool. -b, --bundles strings comma separated list of bundles to add -c, --container-tool string tool to interact with container images (save, build, etc.). One of: [docker, podman] -f, --from-index string previous index to add to --generate if enabled, just creates the dockerfile and saves it to local disk -h, --help help for deprecatetruncate -d, --out-dockerfile string if generating the dockerfile, this flag is used to (optionally) specify a dockerfile name --permissive allow registry load errors -p, --pull-tool string tool to pull container images. One of: [none, docker, podman]. Defaults to none. Overrides part of container-tool. -t, --tag string custom tag for container image being built Global Flags: --skip-tls skip TLS certificate verification for container image registries while pulling bundles or index ╭─bandrade@localhost ~/QE/operator-registry ‹master› ╰─$ 1 ↵ ╭─bandrade@localhost ~/QE/operator-registry ‹master› ╰─$ ./bin/opm index deprecatetruncate --generate --binary-image registry.redhat.io/openshift4/ose-operator-registry:v4.6 --from-index registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 --bundles registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3,registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4 --container-tool podman INFO[0000] deprecating bundles from the index bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0000] Pulling previous image registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 to get metadata bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0000] running /usr/bin/podman pull registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0046] running /usr/bin/podman pull registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.6 bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0051] Getting label data from previous image bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0051] running podman inspect bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0051] running podman create bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0051] running podman cp bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0057] running podman rm bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" INFO[0061] deprecating bundles bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" ERRO[0061] permissive mode disabled bundles="[registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:3e953a2a4910d026672681f97bdb8bfbc0c0ce21ed74790df254d8398ee8d7b9 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:5ee476b093569846e19deca332ff18809f01e46353e0d4d8de10876be60ef3e3 registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4]" error="error deprecating bundle registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4: Bundle deprecation causing default channel removal" Error: error deprecating bundle registry.redhat.io/openshift-pipelines-tech-preview/pipelines-rhel8-operator-metadata@sha256:0f4b4082d0b087da0a56cf43ce17763925ac2bca743bf1ef164a38375ae3c5a4: Bundle deprecation causing default channel removal Usage: opm index deprecatetruncate [flags] Flags: -i, --binary-image opm container image for on-image opm command -u, --build-tool string tool to build container images. One of: [docker, podman]. Defaults to podman. Overrides part of container-tool. -b, --bundles strings comma separated list of bundles to add -c, --container-tool string tool to interact with container images (save, build, etc.). One of: [docker, podman] -f, --from-index string previous index to add to --generate if enabled, just creates the dockerfile and saves it to local disk -h, --help help for deprecatetruncate -d, --out-dockerfile string if generating the dockerfile, this flag is used to (optionally) specify a dockerfile name --permissive allow registry load errors -p, --pull-tool string tool to pull container images. One of: [none, docker, podman]. Defaults to none. Overrides part of container-tool. -t, --tag string custom tag for container image being built Global Flags: --skip-tls skip TLS certificate verification for container image registries while pulling bundles or index
This is expected when deprecating the head of the default channel. You can't deprecate the entire bundle, you'd have to build the index without it.
Thanks, marking as VERIFIED considering the previous comment
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 (Moderate: OpenShift Container Platform 4.9.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-2021:3759