Bug 2090135 - [upstream] Operator-sdk run bundle offer the wrong error message
Summary: [upstream] Operator-sdk run bundle offer the wrong error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Operator SDK
Version: 4.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.12.0
Assignee: Rashmi Gottipati
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-25 08:36 UTC by Fan Jia
Modified: 2023-01-17 19:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-17 19:49:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:49:41 UTC

Description Fan Jia 2022-05-25 08:36:12 UTC
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:

Comment 1 Rashmi Gottipati 2022-05-26 19:07:35 UTC
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!

Comment 3 Rashmi Gottipati 2022-06-22 17:53:40 UTC
Created PR https://github.com/operator-framework/operator-sdk/pull/5893 to fix this bug. Please do verify the fix. Thanks Jia!

Comment 8 errata-xmlrpc 2023-01-17 19:49:26 UTC
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


Note You need to log in before you can comment on or make changes to this bug.