Bug 1667844

Summary: [marketplace] The catalogsource’s displayname&publisher will become blank if you create the CSC including the operators that belong to the default operators
Product: OpenShift Container Platform Reporter: Fan Jia <jfan>
Component: OLMAssignee: Abu Kashem <akashem>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aravindh, chezhang, dyan, jfan, jiazha, zitang
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:42:06 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:

Comment 2 Fan Jia 2019-01-28 07:58:48 UTC
Aravindh , Maybe I miss some description. I will describe the problem again, And because of this PR : "https://github.com/openshift/console/pull/1101
",  This problem becomes to another situation. 

1. the ordinary problem 
1) the cluster create a community operatorsource & catalogsourceconfig & catalogsource with displayname "Certified Operators" and publisher "Red Hat"
such as:
type                 name                   displayname            publisher
operatorsource      community-operators     Community Operators    Red Hat
catalogsourceconfig community-operators     Community Operators    Red Hat
catalogsource       community-operators     Community Operators    Red Hat
2) choose 3 operators belong to the operatorsource community-operataors to be tested:  "metering", "prometheus" ,"Cluster logging" (didn't mention other operators)
3) install operators "prometheus" to OG "global-operators" through the operator hub UI. Then a default catalogsourceconfig will be created in ns openshift-marketplace and a default catalogsource will be created in ns openshift-operators
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
marketplace-enabled-operators-community   metering                             Community Operators    Red Hat                                                                                                                   

#oc get catalogsource -n openshift-operators 
NAME                                      NAME                        PUBLISHER  
marketplace-enabled-operators-community   Community Operators         Red Hat 
`

4) create a catalogsourceconfig test with the operators “metering” which belong to OS “community-operators”
Then a catalogsourceconfig test will be created and a catalogsource test will be created
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
marketplace-enabled-operators-community   metering                             Community Operators    Red Hat 
testprometheus                            prometheus                           Custom                 Custom
#oc get catalogsource -n openshift-operators
NAME                                      NAME                        PUBLISHER  
marketplace-enabled-operators-community   Community Operators         Red Hat 
testprometheus                            Custom                      Custom
`
5) install operators "Cluster logging" OG "global-operators" through the operator hub UI. Then the catalogsourceconfig& catalogsource "marketplace-enabled-operators-community" will be updated without displayname and publisher (It should be "Community Operators" and "Red Hat")
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
marketplace-enabled-operators-community   metering,cluster-logging             
testprometheus                            prometheus                           Custom                 Custom
#oc get catalogsource -n openshift-operators
NAME                                      NAME                        PUBLISHER  
marketplace-enabled-operators-community    
testprometheus                            Custom                      Custom
`

2. after the fix PR, the problem now
1) the cluster create an community operatorsource & catalogsourceconfig & catalogsource with displayname "Certified Operators" and publisher "Red Hat"
such as:
type                 name                   displayname            publisher
operatorsource      community-operators     Community Operators    Red Hat
catalogsourceconfig community-operators     Community Operators    Red Hat
catalogsource       community-operators     Community Operators    Red Hat
2) choose 3 operators belong to the operatorsource community-operataors to be tested:  "metering", "prometheus" ,"Cluster logging" (didn't mention other operators)
3) install operators "prometheus" to OG "global-operators" through the operator hub UI. Then a default catalogsourceconfig will be created in ns openshift-marketplace and a default catalogsource will be created in ns openshift-operators
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
installed-community-global-operators      metering                             Community Operators    Community                                                                                                                  

#oc get catalogsource -n openshift-operators 
NAME                                      NAME                        PUBLISHER  
installed-community-global-operators      Community Operators         Community 
`
4) create a catalogsourceconfig test with the operators “metering” which belong to OS “community-operators” (by yaml csctest.yaml)
Then a catalogsourceconfig test will be created and a catalogsource test will be created
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
installed-community-global-operators      metering                             Community Operators    Community 
testprometheus                            prometheus                           Custom                 Custom
#oc get catalogsource -n openshift-operators
NAME                                      NAME                        PUBLISHER  
installed-community-global-operators      Community Operators         Community 
testprometheus                            Custom                      Custom
`
5) install operators "Cluster logging" OG "global-operators" through the operator hub UI. Then the catalogsourceconfig "installed-community-global-operators" will be updated without displayname and publisher (It should be "Community Operators" and "Community") but the catalogsource won't be changed
`
#oc get catalogsourceconfig -n openshift-marketplace
NAME                                      PACKAGES                             DISPLAYNAME            PUBLISHER
community-operators                       prometheus,metering,cluster-logging  Community Operators    Red Hat        
installed-community-global-operators      metering,cluster-logging             
testprometheus                            prometheus                           Custom                 Custom
#oc get catalogsource -n openshift-operators
NAME                                      NAME                        PUBLISHER  
installed-community-global-operators      Community Operators         Community
testprometheus                            Custom                      Custom
`

csctest.yaml
###############################################
apiVersion: v1
items:
- apiVersion: marketplace.redhat.com/v1alpha1
  kind: CatalogSourceConfig
  metadata:
    name: testprometheus
    namespace: openshift-marketplace
  spec:
    packages: prometheus
    targetNamespace: openshift-operators
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
#################################################

Comment 3 Abu Kashem 2019-02-26 20:54:09 UTC
Hi Jia,
I followed the steps you mentioned above and failed to reproduce the bug. Can you verify that it is still reproducible?

I tested with the build - 
    image: registry.svc.ci.openshift.org/openshift/origin-release@sha256:1eda20cab8c918ff29065148b50a29b9257ec54e43f47317f32d117da6725847
    version: 4.0.0-0.alpha-2019-02-25-174207

Comment 4 Zhang Cheng 2019-02-27 02:20:07 UTC
Jia, please help to double confirm. Thanks.

Comment 5 Fan Jia 2019-02-27 05:53:29 UTC
test env:
cv:4.0.0-0.nightly-2019-02-26-125216

Yes, this situation won't happen now. It is fixed .

Comment 8 errata-xmlrpc 2019-06-04 10:42:06 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