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 dependency doesn't always deploy operator from the default channel #2067

Closed
horis233 opened this issue Mar 30, 2021 · 5 comments · Fixed by #2068
Closed

OLM dependency doesn't always deploy operator from the default channel #2067

horis233 opened this issue Mar 30, 2021 · 5 comments · Fixed by #2068
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@horis233
Copy link
Contributor

horis233 commented Mar 30, 2021

Bug Report

What did you do?
A clear and concise description of the steps you took (or insert a code snippet).

I have Operator A and Operator B,

Operator A depends on Operator B.

In the bundle metadata of Operator A, there is a dependencies.yaml file to specify the package version and GVK of Operator B.

In Operator B, there are two channels that can fulfill the requirements in the dependencies.yaml of Operator A, beta channel and v3 channel. The v3 channel is the default channel of Operator B.

What did you expect to see?
A clear and concise description of what you expected to happen (or insert a code snippet).

What I expect to see is v3 channel of the Operator B can be always chosen when deploying the Operator A.

What did you see instead? Under which circumstances?
A clear and concise description of what you expected to happen (or insert a code snippet).

What I observe is after deploying the Operator A, sometimes beta channel of Operator B is picked and sometimes v3 channel of Operator B is picked up, which is against the dependency resolution

Environment

  • operator-lifecycle-manager version:
    0.16.1 and 0.17.0
  • Kubernetes version information:
    1.19 and 1.20
  • Kubernetes cluster kind:
    OCP

Possible Solution
NO

Additional context
Add any other context about the problem here.

@horis233 horis233 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 30, 2021
@benluddy
Copy link
Contributor

Are you able to share the index image that you've used to reproduce this? That doc looks correct to me -- it should consistently select the version in the default channel unless there is a conflict that blocks installation of the default channel entry.

@horis233
Copy link
Contributor Author

horis233 commented Mar 30, 2021

@benluddy

Yes sure, Thanks for your quick response!

These are steps to reproduce this issue:

  1. Create two catalogsources
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ibm-operator-catalog
  namespace: openshift-marketplace
spec:
  displayName: IBM Operator Catalog
  image: docker.io/ibmcom/ibm-operator-catalog
  publisher: IBM
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 45m

and

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: opencloud-operators
  namespace: openshift-marketplace
spec:
  displayName: IBMCS Operators
  image: 'docker.io/ibmcom/ibm-common-service-catalog:3.7.1'
  publisher: IBM
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 45m
  1. Create IBM Automation Foundation Core operator in a namespace , which is from IBM Operator Catalog and depends on IBM Cloud Pak foundational services from opencloud-operators.
    This is what it looks like

Screen Shot 2021-03-30 at 11 35 02 AM

  1. However, when we check the IBM Cloud Pak foundational services, we can find it is deployed in the beta channel instead of the default channel v3.

Screen Shot 2021-03-30 at 11 36 36 AM

@benluddy benluddy linked a pull request Mar 30, 2021 that will close this issue
@benluddy
Copy link
Contributor

Great, thanks. Using the CatalogSources and images you provided, I was able to reproduce this with https://github.com/benluddy/depster. It's fixed for me with #2068.

@horis233
Copy link
Contributor Author

@benluddy

Thanks for your quick fix!

Could we cherry-pick the fix to release-4.6 and release-4.7?

We will add it as a known issue in our product, but we expect it will be fixed in the Z version OCP.

@benluddy
Copy link
Contributor

I opened https://bugzilla.redhat.com/show_bug.cgi?id=1945261 to track this downstream and marked it to be backported to 4.6.

@joelanford joelanford added this to the 0.18.0 milestone Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants