Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1881222 - OLM can fail to recognize and avoid duplicate package installations
Summary: OLM can fail to recognize and avoid duplicate package installations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Ben Luddy
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On: 1884641
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-21 20:44 UTC by Chris Johnson
Modified: 2020-10-27 16:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:43:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1781 0 None closed Bug 1881222: Annotate CSVs with the properties used during dependency resolution. 2020-11-12 03:47:57 UTC
Red Hat Bugzilla 1884641 0 high CLOSED InstallPlan CRD missing schema for properties field 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:43:58 UTC

Description Chris Johnson 2020-09-21 20:44:06 UTC
Description of problem:
See upstream issue: https://github.com/operator-framework/operator-lifecycle-manager/issues/1772

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-09-17-073141

Comment 2 Ben Luddy 2020-10-01 21:53:45 UTC
This is partially addressed by changes that are already merged for 4.6, but it can still occur with a few tweaks to the test setup. Posted a PR just now to address that as well.

Repro steps:

===

$ cat << EOF kubectl create -f -
---
apiVersion: v1
kind: Namespace
metadata:
  name: test-namespace
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: test-catalogsource
  namespace: test-namespace
spec:
  image: quay.io/bluddy/foo:catalog-1881222
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: operatorgroup
  namespace: test-namespace
spec:
  targetNamespaces:
  - test-namespace
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: testoperatorb
  namespace: test-namespace
spec:
  channel: v4.0
  installPlanApproval: Automatic
  name: testoperatorb
  source: test-catalogsource
  sourceNamespace: test-namespace
EOF

namespace/test-namespace created
catalogsource.operators.coreos.com/test-catalogsource created
operatorgroup.operators.coreos.com/operatorgroup created
subscription.operators.coreos.com/testoperatorb created

... wait ...

$ kubectl -n test-namespace get sub

NAME                                                   PACKAGE         SOURCE               CHANNEL
testoperatora-v1.2-test-catalogsource-test-namespace   testoperatora   test-catalogsource   v1.2
testoperatorb                                          testoperatorb   test-catalogsource   v4.0

$ kubectl -n test-namespace patch sub testoperatorb --type=merge -p '{"spec":{"channel":"v4.1-eus"}}'

subscription.operators.coreos.com/testoperatorb patched

... wait ...

$ kubectl -n test-namespace get sub

NAME                                                       PACKAGE         SOURCE               CHANNEL
testoperatora-v1.1-eus-test-catalogsource-test-namespace   testoperatora   test-catalogsource   v1.1-eus
testoperatora-v1.2-test-catalogsource-test-namespace       testoperatora   test-catalogsource   v1.2
testoperatorb                                              testoperatorb   test-catalogsource   v4.1-eus

===

With this issue fixed, the last list of subscriptions should look like this:

NAME                                                   PACKAGE         SOURCE               CHANNEL
testoperatora-v1.2-test-catalogsource-test-namespace   testoperatora   test-catalogsource   v1.2
testoperatorb                                          testoperatorb   test-catalogsource   v4.1-eus

and testoperator b should still be satisfied by v4.0.1:

$ kubectl -n test-namespace get sub testoperatorb -o jsonpath='{.status.installedCSV}'
testoperatorb.v4.0.1

Please ignore if one of the test operators crashes on startup, which may result in a CSV (appropriately) showing phase Installing. These aren't intended to be functional operators, only to test dependency resolution behavior.

Comment 10 errata-xmlrpc 2020-10-27 16:43:44 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196


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