Bug 1749021 - Conflicts between PackageManifests with the same name from different sources on Console
Summary: Conflicts between PackageManifests with the same name from different sources ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.2.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.2.0
Assignee: Alec Merdler
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-04 17:27 UTC by Bruno Andrade
Modified: 2019-10-16 06:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:40:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 2633 0 None closed Bug 1749021: Ensure Using Correct PackageManifest in Subscription Detail 2021-01-13 20:37:00 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:40:41 UTC

Description Bruno Andrade 2019-09-04 17:27:53 UTC
Description of problem:

If it as more than one package manifest with the same name, even if I create a subscription and choose the right catalog source, the Installed Operators view shows channels that not belongs to the csv that I created a subscription. Here is an evidence http://pics.osci.redhat.com/69dbkx.png

Cluster version: 4.2.0-0.nightly-2019-09-03-102130
Console version: 
"io.openshift.build.commit.id": "https://github.com/openshift/console/commit/4abe099486c94c845751abd04a7cf8e7540ece97"

How reproducible:
Always

Steps to reproduce:
1) Should be created a specific namespace for this test:
oc create ns test-operators

2) Create the ConfigMap(observe that it has only one channel called alpha) and the Catalog Source .

oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/configmap/configmap_etcd-v6.yaml -n openshift-marketplace
oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/catalogsource/catalogsource.yaml -n openshift-marketplace

3) Check that now the cluster have 2 etcd packages
oc get packagemanifest -n openshift-operators | grep etcd
etcd                                        Community Operators   84m
etcd                                        Community Operators   35h

4) Create the OperatorGroup
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test-operators-og
  namespace: test-operators
spec:
  targetNamespaces:
  - test-operators
EOF

5) Create a Subscription:

oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd-etcdoperator.v0.9.2
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: etcd-update
  source: installed-community-global-operators
  sourceNamespace: openshift-marketplace
  startingCSV: etcdoperator.v0.9.2
EOF


6) Login into Web Console, go to Installed Operators and select the Etcd Operator. Finally click on Subscription and try to edit the channel. It will show the channels from the other etcd package manifest.

Comment 1 Bruno Andrade 2019-09-04 17:35:22 UTC
Actual results:
Console show wrong channels when it has packages with the same name.


Expected results:
Console should show the channels of the package that is referenced on Subscription object

Comment 3 Yadan Pei 2019-09-09 06:47:42 UTC
Steps to reproduce:
1) Should be created a specific namespace for this test:
oc create ns test-operators

2) Create the ConfigMap(observe that it has only one channel called alpha) and the Catalog Source .

oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/configmap/configmap_etcd-v6.yaml -n openshift-marketplace
oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/catalogsource/catalogsource.yaml -n openshift-marketplace

3) Check that now the cluster have 2 etcd packages
oc get packagemanifest -n openshift-operators | grep etcd
etcd                                        Community Operators   84m
etcd                                        Community Operators   35h

4) Create the OperatorGroup
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test-operators-og
  namespace: test-operators
spec:
  targetNamespaces:
  - test-operators
EOF

5) Create a Subscription in 'test-operators' namespace:

oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd-etcdoperator.v0.9.2
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: etcd-update
  source: installed-community-global-operators
  sourceNamespace: openshift-marketplace
  startingCSV: etcdoperator.v0.9.2
EOF

Using above reproduction steps to create resources, then 
Login to web-console -> Installed Operators -> choose 'test-operators' namespace -> click on etcd-update, it will show subscription details, it only show `alpha` in Channel field

This is verified on 4.2.0-0.nightly-2019-09-08-180038

Comment 4 errata-xmlrpc 2019-10-16 06:40:32 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:2922


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