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

Unable to uninstall OLM #789

Closed
camilamacedo86 opened this issue Mar 28, 2019 · 10 comments · Fixed by #1438
Closed

Unable to uninstall OLM #789

camilamacedo86 opened this issue Mar 28, 2019 · 10 comments · Fixed by #1438
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.

Comments

@camilamacedo86
Copy link
Contributor

WHAT:

How to uninstall OLM?

Expected

  • Script to uninstall and make command
  • Documentation over it
@camilamacedo86 camilamacedo86 changed the title How to uninstall OLM? Unable to uninstall OLM Mar 28, 2019
@jmazzitelli
Copy link
Contributor

+1 !!

I tried oc delete -f deploy/okd/manifests/latest/

and now my namespaces are blocked in the terminating state and not going away.

$ oc get namespace openshift-operators
NAME                  STATUS        AGE
openshift-operators   Terminating   20h
$ oc get namespace openshift-operator-lifecycle-manager 
NAME                                   STATUS        AGE
openshift-operator-lifecycle-manager   Terminating   20h

There are finalizers listed - so I assume a finalizer failed and now the namespaces are blocked:

$ oc get namespace openshift-operators -o yaml
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{},"name":"openshift-operators","namespace":""},"spec":{"finalizers":[]}}
    openshift.io/sa.scc.mcs: s0:c22,c14
    openshift.io/sa.scc.supplemental-groups: 1000490000/10000
    openshift.io/sa.scc.uid-range: 1000490000/10000
  creationTimestamp: 2019-04-11T17:45:09Z
  deletionTimestamp: 2019-04-12T13:35:44Z
  name: openshift-operators
  resourceVersion: "1048433"
  selfLink: /api/v1/namespaces/openshift-operators
  uid: 8d16cc01-5c81-11e9-81da-54e1addf59b3
spec:
  finalizers:
  - kubernetes
status:
  phase: Terminating
$ oc get namespace openshift-operator-lifecycle-manager -o yaml
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{},"name":"openshift-operator-lifecycle-manager","namespace":""}}
    openshift.io/sa.scc.mcs: s0:c22,c9
    openshift.io/sa.scc.supplemental-groups: 1000480000/10000
    openshift.io/sa.scc.uid-range: 1000480000/10000
  creationTimestamp: 2019-04-11T17:45:09Z
  deletionTimestamp: 2019-04-12T13:35:44Z
  name: openshift-operator-lifecycle-manager
  resourceVersion: "1043578"
  selfLink: /api/v1/namespaces/openshift-operator-lifecycle-manager
  uid: 8d161d42-5c81-11e9-81da-54e1addf59b3
spec:
  finalizers:
  - kubernetes
status:
  phase: Terminating

@ecordell
Copy link
Member

ecordell commented May 9, 2019

This is an ordering issue -

If you delete the apiservice first (packagemanifests), then the crds, and then the other resources, you should be in the clear.

We should have a tool to do this for you so I'll leave this open to track that.

@gerrit8143
Copy link

deleting the packagemanifests doesn't seem to work

$ kubectl delete packagemanifests.packages.operators.coreos.com -n olm --all                                                                                                                                                              
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource
Error from server (MethodNotAllowed): the server does not allow this method on the requested resource

@gerrit8143
Copy link

The following worked for me:

kubectl delete crd catalogsources.operators.coreos.com clusterserviceversions.operators.coreos.com installplans.operators.coreos.com operatorgroups.operators.coreos.com subscriptions.operators.coreos.com

followed by

kubectl delete ns olm

@camilamacedo86
Copy link
Contributor Author

camilamacedo86 commented Jun 10, 2019

Hi folks,
In the following PR the make command make uninstall was added and it shows working fine 100% for me. Please, feel free to review.

#898

@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 28, 2020
@stale
Copy link

stale bot commented Apr 28, 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 Apr 28, 2020
@camilamacedo86
Copy link
Contributor Author

The PR to address it is : #1438

@blues-man
Copy link

blues-man commented May 20, 2020

Hello, I'm trying to add OLM as an addon for Minikube with this PR, but I'm not able to uninstall OLM in a clean way.

minikube addons enable olm runs:

kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/crds.yaml
kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/olm.yaml

minikube addons disable olm runs:

kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/crds.yaml
kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.14.1/olm.yaml

The error is because of order when deleting those I guess (can't find CRDs since they are deleted in first step), but if I invert the order then I got deleting pending (finalizers?) with olm namespaces in Terminating.

I'm wondering what is the correct procedure to uninstall olm, I wasn't able to reproduce the procedure I see in this PR for make uninstall successfully.

Thanks!

@Morriz
Copy link

Morriz commented Feb 22, 2021

Why was this closed? This seems to be an issue still...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants