Description of problem: Operator-sdk run bundle will give the wrong error message while the offered index image doesn't exist or UNAUTHORIZED. Version-Release number of selected component (if applicable): operator-sdk version operator-sdk version: "v1.20.0-16-g38b8b8d9", commit: "38b8b8d949578a44fb23319e56c242fd620523ca", kubernetes version: "v1.23", go version: "go1.17.4", GOOS: "linux", GOARCH: "amd64" How reproducible: always Steps to Reproduce: 1.install operator through run bundle (the index image doesn't exist) $ operator-sdk run bundle quay.io/xxxxx/k8sstatus-bundle:v4.10 --index-image quay.io/kakatest/kkkkk:test Actual results: $operator-sdk-upstream run bundle quay.io/xxxxx/k8sstatus-bundle:v4.10 --index-image quay.io/kakatest/kkkkk:test FATA[0010] Failed to run bundle: error in upgrading the bundle "" that was installed traditionally Expected results: $operator-sdk-upstream run bundle quay.io/xxxxx/k8sstatus-bundle:v4.10 --index-image quay.io/kakatest/kkkkk:test FATA[0011] Failed to run bundle: create catalog: error creating registry pod: get database path: get index image labels: error pulling image quay.io/kakatest/kkkkk:test: error resolving name : unexpected status code [manifests test]: 401 UNAUTHORIZED Additional info:
I've tried to reproduce this issue by running the below: $operator-sdk run bundle quay.io/xxxxx/k8sstatus-bundle:v4.10 --index-image quay.io/kakatest/kkkkk:test (the bundle image and index image that you provided). Here is the error message I got: FATA[0001] Failed to run bundle: pull bundle image: error pulling image quay.io/xxxxx/k8sstatus-bundle:v4.10: error resolving name : unexpected status code [manifests v4.10]: 401 UNAUTHORIZED This is the actual and expected result when we try to install an operator bundle with an index that does not exist/or is unauthorized. However, in your description, I do notice that the actual result is different to what I'm seeing when I run it. Are you trying to run this locally or a specific OCP version? Also, I'm not sure why this a blocker, since it may be related to improved error logging for run bundle feature. Could you please clarify? Looking forward to your clarifications. Thanks!
Created PR https://github.com/operator-framework/operator-sdk/pull/5893 to fix this bug. Please do verify the fix. Thanks Jia!
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.12.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:7399