Bug 1874751 - OLM in OKD should use public mirror of the community operator index
Summary: OLM in OKD should use public mirror of the community operator index
Keywords:
Status: POST
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Vadim Rutkovsky
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-02 07:25 UTC by Vadim Rutkovsky
Modified: 2020-09-22 19:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift origin pull 25523 None closed Bug 1879873: OLM 'can subscribe to the operator' test: skip if redhat-operators is not enabled 2020-09-22 19:43:41 UTC
Github openshift release pull 11529 None open Bug 1874751: OKD: build marketplace package from Dockerfile.okd 2020-09-21 16:30:59 UTC
Github operator-framework operator-marketplace pull 332 None closed Bug 1874751: Add OKD-specific Dockerfile 2020-09-22 19:43:38 UTC
Github operator-framework operator-marketplace pull 337 None closed Bug 1874751: Dockerfile.okd: switch to root user when updating manifests 2020-09-22 19:43:38 UTC

Description Vadim Rutkovsky 2020-09-02 07:25:05 UTC
OKD can be installed without a pull secret, so community operator index should be pullable without a pull secret. In order to be aligned with OCP a different image needs to be promoted to OKD payload. This image should use registry.access.redhat.com as a source of community operator index

Comment 3 Vadim Rutkovsky 2020-09-02 15:15:29 UTC
Additional fix is required - https://github.com/operator-framework/operator-marketplace/pull/337

Comment 5 Jian Zhang 2020-09-09 10:30:13 UTC
The community operator can be pulled without a pull secret. But, 

[root@preserve-olm-env data]# docker pull registry.access.redhat.com/redhat/community-operator-index:latest
latest: Pulling from redhat/community-operator-index
df20fa9351a1: Already exists 
03260e9c3f62: Already exists 
3b3720faeeee: Already exists 
422d96fd767d: Already exists 
52be893bac91: Pull complete 
Digest: sha256:e96d337770f24513b70d8e9ac5fd09cad7d367966b3da34ac5f655e383c587b2
Status: Downloaded newer image for registry.access.redhat.com/redhat/community-operator-index:latest
registry.access.redhat.com/redhat/community-operator-index:latest

mac:~ jianzhang$ oc get clusterversion
NAME      VERSION                         AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.okd-2020-08-29-043816   True        False         3m33s   Cluster version is 4.6.0-0.okd-2020-08-29-043816
mac:~ jianzhang$ occ project openshift-marketplace
-bash: occ: command not found
mac:~ jianzhang$ oc project openshift-marketplace
Now using project "openshift-marketplace" on server "https://api.ci-ln-2jz117b-f76d1.origin-ci-int-gce.dev.openshift.com:6443".
mac:~ jianzhang$ oc get pods
NAME                                    READY   STATUS    RESTARTS   AGE
community-operators-spnht               1/1     Running   0          3m20s
marketplace-operator-85697d4b4f-g7h5w   1/1     Running   0          26m
mac:~ jianzhang$ oc get catalogsource 
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
community-operators   Community Operators   grpc   Red Hat     25m

Use this registry.access.redhat.com/redhat/community-operator-index:latest as the CatalogSource index image. It works well.
mac:~ jianzhang$ oc edit catalogsource  community-operators 
catalogsource.operators.coreos.com/community-operators edited
mac:~ jianzhang$ oc get catalogsource community-operators -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
...

spec:
  displayName: Community Operators
  icon:
    base64data: ""
    mediatype: ""
  image: registry.access.redhat.com/redhat/community-operator-index:latest
  publisher: Red Hat
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 10m0s

mac:~ jianzhang$ oc get pods
NAME                                    READY   STATUS    RESTARTS   AGE
community-operators-lm678               1/1     Running   0          28s
marketplace-operator-85697d4b4f-g7h5w   1/1     Running   0          29m
mac:~ jianzhang$ oc logs community-operators-lm678
time="2020-09-09T10:24:45Z" level=info msg="Keeping server open for infinite seconds" database=/database/index.db port=50051
time="2020-09-09T10:24:45Z" level=info msg="serving registry" database=/database/index.db port=50051

mac:~ jianzhang$ oc get packagemanifest
NAME                                    CATALOG               AGE
podium-operator-bundle                  Community Operators   31m
eclipse-che                             Community Operators   31m
mattermost-operator                     Community Operators   31m
...

LGTM, verify it.

Comment 6 Jian Zhang 2020-09-10 00:48:46 UTC
Sorry, antoher problem is that the default image of the Community CatalogSource is "quay.io/openshift-community-operators/catalog:latest", not the "registry.access.redhat.com/redhat/community-operator-index:latest". I guess that's not expected.
Change the status to the ASSIGNED first. 

mac:~ jianzhang$ oc get catalogsource 
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
community-operators   Community Operators   grpc   Red Hat     25m
mac:~ jianzhang$ oc get catalogsource  community-operators -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
...
  name: community-operators
  namespace: openshift-marketplace
  resourceVersion: "35685"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-marketplace/catalogsources/community-operators
  uid: 3d81a994-de5c-4300-99e2-149d6a9bace0
spec:
  displayName: Community Operators
  icon:
    base64data: ""
    mediatype: ""
  image: quay.io/openshift-community-operators/catalog:latest
  publisher: Red Hat
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 10m0s
...

Comment 7 Jian Zhang 2020-09-10 00:51:33 UTC
I installed this OKD cluster via the cluster-bot: launch 4.6.0-0.okd-2020-08-29-043816

Comment 8 Vadim Rutkovsky 2020-09-10 07:55:11 UTC
OKD release with this change has not yet been accepted (we're battling the installer/MCO issues). 
Lets keep this open until installable OKD release with this change is accepted


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