Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1802089

Summary: oc get package manifest returns only one results if there are suppose to be two with the same name
Product: OpenShift Container Platform Reporter: Petr Balogh <pbalogh>
Component: OLMAssignee: Vu Dinh <vdinh>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high CC: mbukatov, nhale, vdinh
Version: 4.3.0   
Target Milestone: ---   
Target Release: ---   
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: 2020-02-14 14:52:12 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 Petr Balogh 2020-02-12 10:52:44 UTC
Description of problem:
Currently if you add CatalogSource which contains the same package as is available from source like Red Hat Operators it's in the conflict and OCP in 4.3 started to print only one PackageManifest.

This is also changing over the time as you can see:
$ oc get packagemanifest -n openshift-marketplace |grep ocs-operator
ocs-operator                                 Red Hat Operators     5d18h
$ oc get packagemanifest -n openshift-marketplace |grep ocs-operator
ocs-operator                                 Openshift Container Storage   5d18h

During this time I changed catalog source to pointing to the new build and started agin show from Openshift Container Storage source.

It used to show both operators
$ oc get packageManifest -n openshift-marketplace
NAME                                         CATALOG                       AGE
#If you grep for ocs-operator you will get 2 entries with ocs-operator name
ocs-operator                                 Red Hat Operators             52m
ocs-operator                                 Openshift Container Storage   46m 


As a RFE I think that it will be very useful for testing internal builds which QE needs to test and have the same name of the package.

We cannot just disable Red Hat Operators as we need to consume for example: local-storage-operator


Version-Release number of selected component (if applicable):
4.3


How reproducible:


Steps to Reproduce:
1.Install OCP 4.3
2.Add catalog source for OCS https://github.com/red-hat-storage/ocs-ci/blob/master/ocs_ci/templates/ocs-deployment/catalog-source.yaml


Actual results:
Shows only one result of packageManifest


Expected results:
Show both packageManifests


Additional info:

Comment 1 Martin Bukatovic 2020-02-12 16:44:09 UTC
Referencing original ocs-ci issue https://github.com/red-hat-storage/ocs-ci/issues/1338

Comment 2 Petr Balogh 2020-02-13 13:36:09 UTC
One more thing which I found out.

I thought that if I will disable redhat operators source that we will again see the one from Openshift Container Storage but I didn't see any.

apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"config.openshift.io/v1","kind":"OperatorHub","metadata":{"annotations":{},"name":"cluster"},"spec":{"sources":[{"disabled":true,"name":"redhat-operators"}]}}
    release.openshift.io/create-only: "true"
  creationTimestamp: "2020-02-12T11:09:29Z"
  generation: 2
  name: cluster
  resourceVersion: "852320"
  selfLink: /apis/config.openshift.io/v1/operatorhubs/cluster
  uid: fc33b32d-a462-4f29-bf84-f0e2f9252529
spec:
  sources:
  - disabled: true
    name: redhat-operators
status:
  sources:
  - disabled: true
    name: redhat-operators
    status: Success
  - disabled: false
    name: certified-operators
    status: Success
  - disabled: false
    name: community-operators
    status: Success





Catalog source is in ready state:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  creationTimestamp: "2020-02-12T11:49:05Z"
  generation: 1
  labels:
    ocs-operator-internal: "true"
  name: ocs-catalogsource
  namespace: openshift-marketplace
  resourceVersion: "808450"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-marketplace/catalogsources/ocs-catalogsource
  uid: 9a9e48b3-384b-466d-a134-9d2366ee44c8
spec:
  displayName: Openshift Container Storage
  icon:
    base64data: ""
    mediatype: ""
  image: quay.io/rhceph-dev/ocs-olm-operator:4.3-308.8ec8be3.release_4.3
  publisher: Red Hat
  sourceType: grpc
status:
  connectionState:
    address: ocs-catalogsource.openshift-marketplace.svc:50051
    lastConnect: "2020-02-13T09:37:41Z"
    lastObservedState: READY
  registryService:
    createdAt: "2020-02-12T11:49:06Z"
    port: "50051"
    protocol: grpc
    serviceName: ocs-catalogsource
    serviceNamespace: openshift-marketplace


But there is no packagemanifest of ocs:
$ oc get packagemanifest -n openshift-marketplace |grep ocs 

this returns nothing.

Not sure where I can get some more details why we do not see packagemanifest.

Please advice

Comment 3 Petr Balogh 2020-02-13 13:42:39 UTC
This disappeared packagemanifest we mainly see on cluster deployed over VmWare. Not sure it this can be related somehow to vmware.

Comment 5 Vu Dinh 2020-02-14 14:52:12 UTC

*** This bug has been marked as a duplicate of bug 1786471 ***

Comment 6 Petr Balogh 2020-02-14 17:50:32 UTC
Hello Vu Dinh,

I see that I forgot to add the example RFE I was trying to mention in the first comment.

What about have feature for disabling specific packages from specific source?


Something like:

apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
  name: cluster
spec:
  sources:
  - disabledPackages:
    - ocs-operator
    name: redhat-operators

Do you think it's feasible? If so I will open RFE BZ for that.

Comment 7 Vu Dinh 2020-02-14 18:10:50 UTC
This is an interesting suggestion in term of the solution and I can see the reason behind what you suggested. It is technically feasible but the underline issue is there are 2 CatalogSources contain 2 identical packages, not just the OperatorHub itself. The team is aware of this problem. I would recommend you to go ahead with RFE request and we will go from there.

Comment 8 Petr Balogh 2020-02-14 18:30:09 UTC
Great, RFE BZ opened here: https://bugzilla.redhat.com/show_bug.cgi?id=1803230