Bug 1821611 - Operator Hub is totally broken when adding custom operators
Summary: Operator Hub is totally broken when adding custom operators
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.5.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-07 08:14 UTC by Yadan Pei
Modified: 2020-07-13 17:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:25:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4949 0 None closed Bug 1821611: Fix runtime error on OperatorHub page 2020-06-23 09:51:11 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:26:05 UTC

Description Yadan Pei 2020-04-07 08:14:55 UTC
Description of problem:
Add operators.openshift.io/infrastructure-features annotation to operator CSV and create catalog source with customized image, it will break Operator Hub

Version-Release number of selected component (if applicable):
    4.5.0-0.nightly-2020-04-06-184201

How reproducible:
Always

Steps to Reproduce:
1. Build a custom image containing 3 operators with annotation operators.openshift.io/infrastructure-features
[yapei@New_Mac manifests]$ grep -nr 'operators.openshift.io/infrastructure-features' *
cockroachdb/2.1.11/cockroachdb.v2.1.11.clusterserviceversion.yaml:26:    operators.openshift.io/infrastructure-features: Disconnected
hawtio/0.2.0/hawtio-operator.v0.2.0.clusterserviceversion.yaml:7:    operators.openshift.io/infrastructure-features: Proxy
keda/1.3.0/keda.v1.3.0.clusterserviceversion.yaml:17:    operators.openshift.io/infrastructure-features: FIPS Mode

[yapei@New_Mac operator-registry]$ docker build -f upstream-example.Dockerfile -t quay.io/yapei/console-2124:infras .
Sending build context to Docker daemon  85.38MB
Step 1/10 : FROM quay.io/operator-framework/upstream-registry-builder as builder
 ---> 53136ea017f3
Step 2/10 : COPY manifests manifests
 ---> 4d7d1c932e2a
Step 3/10 : RUN /bin/initializer -o ./bundles.db
 ---> Running in 27825876e32f
time="2020-04-07T06:10:35Z" level=info msg="loading Bundles" dir=manifests
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=manifests load=bundles
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=cockroachdb load=bundles
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.0.9 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=cockroachdb.v2.0.9.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.0.9 file=cockroachdb.v2.0.9.clusterserviceversion.yaml load=bundle name=cockroachdb.v2.0.9
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.0.9 file=cockroachdbs.charts.helm.k8s.io.crd.yaml load=bundle name=cockroachdb.v2.0.9
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.1.1 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=cockroachdb.v2.1.1.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.1.1 file=cockroachdb.v2.1.1.clusterserviceversion.yaml load=bundle name=cockroachdb.v2.1.1
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.1.1 file=cockroachdbs.charts.helm.k8s.io.crd.yaml load=bundle name=cockroachdb.v2.1.1
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.1.11 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=cockroachdb.v2.1.11.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.1.11 file=cockroachdb.v2.1.11.clusterserviceversion.yaml load=bundle name=cockroachdb.v2.1.11
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/cockroachdb/2.1.11 file=cockroachdbs.charts.helm.k8s.io.crd.yaml load=bundle name=cockroachdb.v2.1.11
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=hawtio load=bundles
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=0.1.0 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=hawtio-operator.v0.1.0.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/hawtio/0.1.0 file=hawtio-operator.v0.1.0.clusterserviceversion.yaml load=bundle name=hawtio-operator.v0.1.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/hawtio/0.1.0 file=hawtios.hawt.io.crd.yaml load=bundle name=hawtio-operator.v0.1.0
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=0.2.0 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=hawtio-operator.v0.2.0.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/hawtio/0.2.0 file=hawtio-operator.v0.2.0.clusterserviceversion.yaml load=bundle name=hawtio-operator.v0.2.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/hawtio/0.2.0 file=hawtios.hawt.io.crd.yaml load=bundle name=hawtio-operator.v0.2.0
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=keda load=bundles
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=1.2.0 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=keda.v1.2.0.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.2.0 file=keda.v1.2.0.clusterserviceversion.yaml load=bundle name=keda.v1.2.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.2.0 file=kedacontrollers.keda.k8s.io.crd.yaml load=bundle name=keda.v1.2.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.2.0 file=scaledobjects.keda.k8s.io.crd.yaml load=bundle name=keda.v1.2.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.2.0 file=triggerauthentications.keda.k8s.io.crd.yaml load=bundle name=keda.v1.2.0
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=1.3.0 load=bundles
time="2020-04-07T06:10:35Z" level=info msg="found csv, loading bundle" dir=manifests file=keda.v1.3.0.clusterserviceversion.yaml load=bundles
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.3.0 file=keda.v1.3.0.clusterserviceversion.yaml load=bundle name=keda.v1.3.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.3.0 file=kedacontrollers.keda.k8s.io.crd.yaml load=bundle name=keda.v1.3.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.3.0 file=scaledobjects.keda.k8s.io.crd.yaml load=bundle name=keda.v1.3.0
time="2020-04-07T06:10:35Z" level=info msg="loading bundle file" dir=manifests/keda/1.3.0 file=triggerauthentications.keda.k8s.io.crd.yaml load=bundle name=keda.v1.3.0
time="2020-04-07T06:10:35Z" level=info msg="loading Packages and Entries" dir=manifests
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=manifests load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=cockroachdb load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.0.9 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.1.1 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=2.1.11 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=hawtio load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=0.1.0 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=0.2.0 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=keda load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=1.2.0 load=package
time="2020-04-07T06:10:35Z" level=info msg=directory dir=manifests file=1.3.0 load=package
Removing intermediate container 27825876e32f
 ---> 88020be36d80
Step 4/10 : FROM scratch
 ---> 
Step 5/10 : COPY --from=builder /build/bundles.db /bundles.db
 ---> fc66d4b672e7
Step 6/10 : COPY --from=builder /bin/registry-server /registry-server
 ---> ce9bd8ceb0c0
Step 7/10 : COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
 ---> a1e9a0620be1
Step 8/10 : EXPOSE 50051
 ---> Running in 4bbb158da0f8
Removing intermediate container 4bbb158da0f8
 ---> f9c72749ea51
Step 9/10 : ENTRYPOINT ["/registry-server"]
 ---> Running in 4e235816aeb7
Removing intermediate container 4e235816aeb7
 ---> 583230841ea5
Step 10/10 : CMD ["--database", "bundles.db"]
 ---> Running in 2fd5c7375179
Removing intermediate container 2fd5c7375179
 ---> 186a6b8c7582
Successfully built 186a6b8c7582
Successfully tagged quay.io/yapei/console-2124:infras

[yapei@New_Mac operator-registry]$ docker push quay.io/yapei/console-2124:infras
The push refers to repository [quay.io/yapei/console-2124]
d4deb1c69484: Pushed 
8158ff97c4d8: Layer already exists 
d0270e976ab0: Pushed 
infras: digest: sha256:ef9c8d16eae6cf20d86f0ef20452af53eef424b4ebf73f79d3b77a8197ded273 size: 949

2. Create Custom Catalog Source from web console, Administration -> Cluster Settings -> Global Configuration -> OperatorHub -> Sources tab -> click 'Create Catalog Source' button ->  set all required fields, set Image (URL of container image) with value quay.io/yapei/console-2124:infras
3. Visit Operator Hub
4. Check status in CLI
# oc get packagemanifests -n openshift-marketplace | grep 'Custom 2124 Testing'
cockroachdb                                  Custom 2124 Testing                               14m
keda                                         Custom 2124 Testing                               14m
hawtio-operator                              Custom 2124 Testing                               14m
# oc logs -f custom-2124-testing-hcfqw -n  openshift-marketplace
time="2020-04-07T06:49:25Z" level=info msg="serving registry" database=bundles.db port=50051


Actual results:
3. Operator Hub is totally broken 
JSON.parse: unexpected character at line 1 column 1 of the JSON data
Component Trace:

in OperatorHubList
    in Unknown
    in Unknown
    in x
    in Unknown
    in x
    in div
    in div
    in div
    in Unknown
    in o
    in OperatorHubPage
    in c
    in t
    in R
    in t
    in div
    in div
    in section
    in d
    in Unknown
    in x
    in x
    in div
    in f
    in div
    in f
    in NotificationDrawer
    in Unknown
    in x
    in Unknown
    in Unknown
    in x
    in Unknown
    in x
    in main
    in div
    in y
    in component
    in t
    in t
    in t
y/y<@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/operator-hub-chunk-dabb23d73251dff31ae8.min.js:1:18054
y@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/operator-hub-chunk-dabb23d73251dff31ae8.min.js:1:16556
Ni@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:55337
ha@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:62378
Ku@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:99519
Bu@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:84010
Lu@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:81035
Du@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:79608
ho/<@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:41759
t.unstable_runWithPriority@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:163:3878
co@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:41488
ho@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:41707
po@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:41640
Mu@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:155:79935
notify@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:18:65175
a</t.notifyNestedSubs@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:18:64744
f</n.notifySubscribers@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:35:196890
a</t.handleChangeWrapper@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:18:64812
v@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:12:251026
f/</</<@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/main-chunk-a25f1e3a133c0f8c7996.min.js:1:88233
dispatch@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/vendors~main-chunk-728d5ab5dafb9076d848.min.js:12:254513
i/</<@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/main-chunk-a25f1e3a133c0f8c7996.min.js:1:95228
i/<@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/main-chunk-a25f1e3a133c0f8c7996.min.js:1:95214
s@https://console-openshift-console.apps.qe-groupd-0407.qe.devcluster.openshift.com/static/main-chunk-a25f1e3a133c0f8c7996.min.js:1:92906

Expected results:
Operator Hub should not broken

Additional info:
Also I added annotation as following, it will also break Operator Hub
cockroachdb/2.1.11/cockroachdb.v2.1.11.clusterserviceversion.yaml:26:    operators.openshift.io/infrastructure-features: 'Disconnected'
hawtio/0.2.0/hawtio-operator.v0.2.0.clusterserviceversion.yaml:7:    operators.openshift.io/infrastructure-features: 'Proxy'
keda/1.3.0/keda.v1.3.0.clusterserviceversion.yaml:17:    operators.openshift.io/infrastructure-features: 'FIPS Mode'

Comment 3 Yadan Pei 2020-04-16 02:06:30 UTC
1. Create custom catalog source
# cat yapei-custom-catalog-source.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: yapei-custom-catalogsource
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/yapei/console-2124:infras
  displayName: Customized Catalog Source YAPEI
  publisher: yapei

# oc create -f yapei-custom-catalog-source.yaml 
catalogsource.operators.coreos.com/yapei-custom-catalogsource created

# oc get pods -n openshift-marketplace | grep yapei
yapei-custom-catalogsource-cpnxf        1/1     Running   0          41s

2. Visit Operators -> OperatorHub, OperatorHub does not break 


Verified on 4.5.0-0.nightly-2020-04-15-194358

Comment 4 errata-xmlrpc 2020-07-13 17:25:52 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, 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/RHBA-2020:2409


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