Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLM picks an operator dependency randomly for operators handling same resources kind provided by the same CatalogSource #1158

Closed
ppatierno opened this issue Dec 2, 2019 · 6 comments

Comments

@ppatierno
Copy link
Contributor

Bug Report

A Strimzi user reported this issue on our project strimzi/strimzi-kafka-operator#2265 and it seems that the OLM selects which operator dependency to use quite randomly.
The Strimzi and the AMQ Streams operators handle the same resources kind in this specific use case, but which dependency is used isn't deterministic.

What did you do?

Specifying requirements for an operator in this way.

required:
    - description: Represents a Kafka cluster
      displayName: Kafka
      kind: Kafka
      name: kafkas.kafka.strimzi.io
      version: v1beta1
    - description: Represents a topic inside a Kafka cluster
      displayName: Kafka Topic
      kind: KafkaTopic
      name: kafkatopics.kafka.strimzi.io
      version: v1beta1

What did you expect to see?
The OLM should always pick the same operator dependency.

What did you see instead? Under which circumstances?
The OLM should always pick an operator dependency randomly.

Environment

Strimzi version: 0.14.0 (AMQ Streams 1.3.0)
Installation method: OperatorHub.io
Kubernetes cluster: OpenShift 4.2
Infrastructure: CRC

@awgreene awgreene changed the title OLM picks an operator dependency randomly for operators handling same resources kind OLM picks an operator dependency randomly for operators handling same resources kind in the same CatalogSource Dec 2, 2019
@awgreene awgreene changed the title OLM picks an operator dependency randomly for operators handling same resources kind in the same CatalogSource OLM picks an operator dependency randomly for operators handling same resources kind provided by the same CatalogSource Dec 2, 2019
@radtriste
Copy link

radtriste commented Dec 3, 2019

Hello,

We are having conflicts on OLM for our operator.
We have a problem for DataGrid and Infinispan operators (Red Hat & Community catalogs):
infinispan/infinispan-operator#226

This is also problematic with AMQ Streams & Strimzi (Red Hat & Community catalogs).

@dmesser
Copy link
Contributor

dmesser commented Jan 8, 2020

@radtriste The behaviour is deterministic: if dependencies are required and multiple Operators exist to fulfil them, the following is the order of preference:

  1. Operators from the same catalog
  2. Operators from other catalogs in the same namespace
  3. Operators from any other catalogs in other namespaces

If you want to force your Operator to be using a particular dependent Operator, you would ship them in the same catalog. There was a bug in an older OLM version, that did not implement this behaviour correctly and it seemed non-deterministic which Operator was chosen.

@radtriste
Copy link

@dmesser Thx for the answer. So it should be corrected by now.
In which version was it corrected ?

@dmesser
Copy link
Contributor

dmesser commented Jan 8, 2020

@radtriste
Copy link

Testing on Openshift 4.2.9 and this seems indeed corrected. I cannot reproduce the problem.
@ppatierno We are ok with that. You may close this one.

@ppatierno
Copy link
Contributor Author

@radtriste @dmesser thanks you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants