Bug 1685459

Summary: [marketplace]The operator "elasticsearch-operator" is downloaded from Community Operator as "elasticserach-operator" cause the operator can't be added to the CSC
Product: OpenShift Container Platform Reporter: Fan Jia <jfan>
Component: OLMAssignee: Aravindh Puthiyaparambil <aravindh>
OLM sub component: OperatorHub QA Contact: Fan Jia <jfan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aravindh, chezhang, dyan, jiazha, zitang
Version: 4.1.0   
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The image that was pushed to quay had a typo in the operator name. The correct name is `elasticsearch-operator` while the bundle was pushed as `elasticserach-operator`. Consequence: Operator cannot be installed Fix: Updated Quay repo name to match the operator's package, and this issue has been resolved. Result: Operator can be installed
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:45:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fan Jia 2019-03-05 09:45:29 UTC
Description of problem:
The operator `elasticsearch-operator` comes from "pre-install" operatorsource community-operator can't be added to the csc when install it from the Operator Hub UI because it is stored as `elasticserach-operator`

Version-Release number of selected component (if applicable):
clusterversion:4.0.0-0.nightly-2019-03-04-234414
console  image:  quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:af4309742b18e8e0e4dc2c7f96c044ede1f2d40c325a9462a25398c39c67bd9f

How reproducible:
always

Steps to Reproduce:
1.choose "elasticsearch-operator" operator in the basic operator hub UI,and click install 
2.click "subscription" button in the loaded subscription page

Actual results:
1.after step 2, the default csc "installed-community-openshift-operators" check the "elasticsearch-operator" is an unlegal operator and the csc can't be updated successfully
#oc get csc 
NAME                                      TARGETNAMESPACE         PACKAGES            STATUS        DISPLAYNAME           PUBLISHER   MESSAGE                                                                                           AGE
installed-community-openshift-operators   openshift-operators     elasticsearch-operator   Configuring   Community Operators   Community   
Still resolving package(s) - elasticsearch-operator. Please make sure these are valid packages.   106m

2. can get the packagemanifest `elasticsearch-operator`
1) #oc get pcakagemanifests | grep "elasticsearch-operator"
elasticsearch-operator   3h

2) #oc describe packagemanifest elasticsearch-operator 
Name:         elasticsearch-operator
Namespace:    openshift-marketplace
Labels:       catalog=community-operators
              catalog-namespace=openshift-marketplace
              csc-owner-name=community-operators
              csc-owner-namespace=openshift-marketplace
              olm-visibility=hidden
              openshift-marketplace=true
              opsrc-datastore=true
              opsrc-owner-name=community-operators
              opsrc-owner-namespace=openshift-marketplace
              opsrc-provider=community
              provider=Red Hat, Inc.
              provider-url=
...
  Default Channel:  preview
  Package Name:     elasticsearch-operator
  Provider:
    Name:  Red Hat, Inc
Events:    <none>

3. the package is downloaded as "elasticserach-operator" in csc "community-operators"
the logs of community-operators
`
time="2019-03-05T06:12:47Z" level=info msg="package(s) specified are - descheduler,automationbroker,templateservicebroker,elasticserach-operator,etcd,prometheus,percona,planetscale,strimzi-kafka-operator,svt-app-operator,federation,jaeger,cluster-logging,oneagent,kiecloud-operator,metering,camel-k,node-problem-detector,postgresql" port=50051 type=appregistry
time="2019-03-05T06:12:47Z" level=info msg="input sanitized - sources: [openshift-marketplace/community-operators], packages: [descheduler automationbroker templateservicebroker elasticserach-operator etcd prometheus percona planetscale strimzi-kafka-operator svt-app-operator federation jaeger cluster-logging oneagent kiecloud-operator metering camel-k node-problem-detector postgresql]" port=50051 type=appregistry
time="2019-03-05T06:12:48Z" level=info msg="resolved the following packages: [community-operators/elasticserach-operator:0.0.1 community-operators/prometheus:0.22.3 community-operators/strimzi-kafka-operator:0.0.2 community-operators/cluster-logging:0.0.4 community-operators/templateservicebroker:0.2.0 community-operators/federation:0.0.1 community-operators/etcd:0.0.5 community-operators/jaeger:0.0.5 community-operators/automationbroker:0.2.2 community-operators/percona:0.0.3 community-operators/planetscale:0.0.2 community-operators/postgresql:0.0.1 community-operators/metering:0.13.2 community-operators/descheduler:0.0.2 community-operators/node-problem-detector:0.0.1 community-operators/kiecloud-operator:0.0.1 community-operators/svt-app-operator:0.0.1 community-operators/camel-k:0.2.0 community-operators/oneagent:0.0.3]" port=50051 type=appregistry
time="2019-03-05T06:12:48Z" level=info msg="downloading repository: community-operators/elasticserach-operator:0.0.1 from https://quay.io/cnr" port=50051 type=appregistry
`

Expected results:
1.after step 2, the default csc  "installed-community-openshift-operators" check the  "elasticsearch-operator" is a legal operator and the csc can be  updated successfully

Additional info:

Comment 1 Sami Shahin 2019-03-05 16:18:15 UTC
The image I pushed to quay last night had a typo in the operator name. The correct name is `elasticsearch-operator` while the bundle was pushed as `elasticserach-operator`. I have since updated the repo name to match the operator's package, and this issue should be resolved.

Comment 2 Fan Jia 2019-03-06 05:11:05 UTC
The name of "elasticsearch-operator" has been right now. The issue won't appear again. This operator can be installed now.
test env:
clusterversion:4.0.0-0.nightly-2019-03-04-234414

Comment 5 errata-xmlrpc 2019-06-04 10:45:04 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-2019:0758