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: Subscription/InstallPlan for namespace scoped operator with required for cluster only scoped operator fails to install required operator #1084

Closed
dacleyra opened this issue Oct 23, 2019 · 9 comments
Labels
triaged Issue has been considered by a member of the OLM community

Comments

@dacleyra
Copy link

Bug Report

What did you do?

  • Create a Namespace scoped operator with a required api/csv that is part of a Cluster only scoped operator, such as serverless-operator.v1.0.0
  • Deploy the Namespace scoped operator using OLM Subscription, allowing OLM to emit an InstallPlan to install the required api/csv operator

What did you expect to see?

  • Both Operators are installed correctly

What did you see instead? Under which circumstances?

  • Required api/csv Operator fails to install with message

Failed: OwnNamespace InstallModeType not supported, cannot configure to watch own namespace

It appears the parent is passing down its InstallMode to the required operator in the InstallPlan, even though it is not supported. OLM could possibly figure out what InstallModes are supported, and choose another.

Environment

  • operator-lifecycle-manager version:

OLM 0.11.0 on OCP 4.2, also tried 0.12.0 with override

  • Kubernetes version information:

Kubernetes Version: v1.14.6+2e5ed54

  • Kubernetes cluster kind:

OCP 4.2

Possible Solution

Additional context

@awgreene
Copy link
Member

Hello @dacleyra,

Thank you for submitting an Issue.

Based on the problem you described, it appears that you've created an OperatorGroup where its spec.targetNamespace is to equal the metadata.namespace field. This configuration requires that any operators deployed within support the OwnNamespace installMode as defined in operatorgroups.md:

  • OwnNamespace: If supported, the operator can be a member of an OperatorGroup that selects its own namespace

Based on the logs you provided, it does not appear that the operator providing the required APIs supports the OwnNamespace InstallMode. The operator that owns the required APIs must be deployed in an OperatorGroup that matches an InstallMode that it supports.

@dacleyra
Copy link
Author

Yes, by installing a namespace scoped operator, the OLM UI creates a Subscription and the OperatorGroup where its spec.targetNamespace is to equal the metadata.namespace field, as you say.

The problem is that that in OLM the Subscription automatically generates an InstallPlan with an unsupported InstallMode for the required apis / operators.

@stale
Copy link

stale bot commented Feb 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 26, 2020
@openshift-ci-robot openshift-ci-robot added triage/unresolved Indicates an issue that can not or will not be resolved. and removed wontfix labels Feb 27, 2020
@stale
Copy link

stale bot commented Apr 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jul 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Sep 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Nov 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jan 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 3, 2021
@dinhxuanvu dinhxuanvu added triaged Issue has been considered by a member of the OLM community and removed triage/unresolved Indicates an issue that can not or will not be resolved. labels Nov 11, 2021
@dinhxuanvu
Copy link
Member

Unfortunately, the OLM resolver simply doesn't take into account the OperatorGroup settings (AKA InstallModes) during resolution. So it is unable to tell if this operator is not installable in this specific namespace. We currently don't have a plan to change the resolver to do so. However, we do have a plan to "descope" the operator so that they will become singleton operators. As a result, the InstallModes will be obsolete in the future. You can take a look at the issue #2437 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been considered by a member of the OLM community
Projects
None yet
Development

No branches or pull requests

4 participants