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

Issue Installing OLM in Openshift Namespace #1683

Closed
atef23 opened this issue Jul 27, 2020 · 6 comments
Closed

Issue Installing OLM in Openshift Namespace #1683

atef23 opened this issue Jul 27, 2020 · 6 comments

Comments

@atef23
Copy link

atef23 commented Jul 27, 2020

Bug Report

What did you do?
I provisioned an Openshift cloud cluster through Red Hat's openTLC labs system so the cluster came preconfigured with some components I don't have full visibility into. I created a new namespace and attempted to install olm using the operator-sdk CLI.

What did you expect to see?
Expected to be able to install OLM if it wasn't there already.

What did you see instead? Under which circumstances?
It seems that some components of OLM are present but not enough to allow for an uninstall. Stuck in a catch-22 where I can't install due to these components but also can't run the uninstall command

`[atefaziz@localhost projects]$ operator-sdk olm status

FATA[0002] Failed to get OLM status: no existing installation found

[atefaziz@localhost projects]$ operator-sdk olm install

INFO[0002] Fetching CRDs for version "latest"

INFO[0003] Fetching resources for version "latest"

FATA[0005] Failed to install OLM version "latest": detected existing OLM resources: OLM must be completely uninstalled before installation

[atefaziz@localhost projects]$ operator-sdk olm uninstall

FATA[0002] Failed to uninstall OLM: no existing installation found
`

Environment

  • operator-lifecycle-manager version:

operator-sdk version: "v0.17.0"

  • Kubernetes version information:

Openshift version:
4.4.8

@kevinrizza
Copy link
Member

Ah, looks like this is a 3.11 cluster, so the cluster component comment I made doesn't apply.

Does the sdk have a verbose option for these commands? I'm not sure exactly what steps the sdk does when it attempts to install/uninstall OLM, but most likely it is just attempting to apply CRDs, then deployments/rbac/service accounts, then a few CRs.

@atef23
Copy link
Author

atef23 commented Jul 27, 2020

@kevinrizza sorry that was my CLI version. The cluster version is 4.4.8. I've updated it above. Hmm yeah I'm going through the source trying to see which existing resources exist which are preventing my installation from proceeding.

@kevinrizza
Copy link
Member

@atef23 Ah, yeah, so in that case OLM is a core openshift component and the sdk won't be able to uninstall it without first putting the cluster in an unsupportable state. Is there a reason you are attempting to uninstall olm, or attempting to install a different version?

@atef23
Copy link
Author

atef23 commented Jul 27, 2020

@kevinrizza ah ok so I guess the issue was that I was using a OC 3.x CLI with a 4.x cluster so it wasn't able to detect the olm installation? I think you're right the olm installation was already there but when I ran the:

operator-sdk olm status

command, it said there was no installation

I manually applied the olm.yaml and crds.yaml from the latest release: https://github.com/operator-framework/operator-lifecycle-manager/releases and after doing that, my operator-sdk olm status command was successfully showing the installation:

`[atefaziz@localhost Downloads]$ operator-sdk olm status
INFO[0006] Fetching CRDs for version "0.15.1"
INFO[0007] Fetching resources for version "0.15.1"
INFO[0008] Successfully got OLM status for version "0.15.1"

NAME NAMESPACE KIND STATUS
olm Namespace Installed
subscriptions.operators.coreos.com CustomResourceDefinition Installed
operatorgroups.operators.coreos.com CustomResourceDefinition Installed
installplans.operators.coreos.com CustomResourceDefinition Installed
clusterserviceversions.operators.coreos.com CustomResourceDefinition Installed
aggregate-olm-edit ClusterRole Installed
catalog-operator olm Deployment Installed
olm-operator olm Deployment Installed
operatorhubio-catalog olm CatalogSource Installed
olm-operators olm OperatorGroup Installed
aggregate-olm-view ClusterRole Installed
operators Namespace Installed
global-operators operators OperatorGroup Installed
olm-operator-serviceaccount olm ServiceAccount Installed
packageserver olm ClusterServiceVersion Installed
system:controller:operator-lifecycle-manager ClusterRole Installed
catalogsources.operators.coreos.com CustomResourceDefinition Installed
olm-operator-binding-olm ClusterRoleBinding Installed
`

@atef23
Copy link
Author

atef23 commented Jul 27, 2020

@kevinrizza thanks for your input, I will close the issue

@atef23 atef23 closed this as completed Jul 27, 2020
@atef23
Copy link
Author

atef23 commented Jul 27, 2020

Summary:

Issue:

No installation found error on Openshift 4 cluster which already has OLM installed by default:

[atefaziz@localhost Documents]$ operator-sdk olm status
FATA[0002] Failed to get OLM status: no existing installation found 

Run crds and resources manually:

oc apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.15.1/crds.yaml oc apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.15.1/olm.yaml
Re-run status check:


[atefaziz@localhost Documents]$ operator-sdk olm status
INFO[0002] Fetching CRDs for version "0.15.1"           
INFO[0003] Fetching resources for version "0.15.1"      
INFO[0005] Successfully got OLM status for version "0.15.1" 

NAME                                            NAMESPACE    KIND                        STATUS
olm                                                          Namespace                   Installed
subscriptions.operators.coreos.com                           CustomResourceDefinition    Installed
operatorgroups.operators.coreos.com                          CustomResourceDefinition    Installed
installplans.operators.coreos.com                            CustomResourceDefinition    Installed
clusterserviceversions.operators.coreos.com                  CustomResourceDefinition    Installed
aggregate-olm-edit                                           ClusterRole                 Installed
catalog-operator                                olm          Deployment                  Installed
olm-operator                                    olm          Deployment                  Installed
operatorhubio-catalog                           olm          CatalogSource               Installed
olm-operators                                   olm          OperatorGroup               Installed
aggregate-olm-view                                           ClusterRole                 Installed
operators                                                    Namespace                   Installed
global-operators                                operators    OperatorGroup               Installed
olm-operator-serviceaccount                     olm          ServiceAccount              Installed
packageserver                                   olm          ClusterServiceVersion       Installed
system:controller:operator-lifecycle-manager                 ClusterRole                 Installed
catalogsources.operators.coreos.com                          CustomResourceDefinition    Installed
olm-operator-binding-olm                                     ClusterRoleBinding          Installed

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

2 participants