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

Cannot delete operator after delete subscription #1168

Closed
clyang82 opened this issue Dec 4, 2019 · 4 comments · Fixed by openshift/openshift-docs#18632
Closed

Cannot delete operator after delete subscription #1168

clyang82 opened this issue Dec 4, 2019 · 4 comments · Fixed by openshift/openshift-docs#18632

Comments

@clyang82
Copy link
Contributor

clyang82 commented Dec 4, 2019

From the document, you can see that:

To delete, or uninstall, an Operator from your cluster, you can simply delete the Subscription to remove it from the subscribed namespace. If you want a clean slate, you can also remove the Operator’s ClusterServiceVersion (CSV) and Deployment.

In my environment, the operator cannot be delete after deleted subscription successfully.
Here is logs of catalog-operator-xxx

time="2019-12-04T03:21:58Z" level=info msg=syncing event=delete reconciling="*v1alpha1.Subscription" selflink=/apis/operators.coreos.com/v1alpha1/namespaces/openshift-operators/subscriptions/my-operator-subsription
E1204 03:21:58.142729       1 reconciler.go:246] unexpected subscription state in installplan reconciler *subscription.subscriptionDeletedState

There is no any InstallPlan in my environment

chunlins-mbp:memcached-operator clyang$ oc get ip --all-namespaces
No resources found.
chunlins-mbp:memcached-operator clyang$ oc get pod
NAME                                  READY   STATUS    RESTARTS   AGE
example-memcached-0.0.2-pod           1/1     Running   3          30h
example-memcached-pod                 1/1     Running   30         30h
memcached-operator-84d559f89d-k9hnh   1/1     Running   0          8h

I am using the openshift 4.2 embedded olm 0.11 . Is it fixed in the latest version?

@gyliu513
Copy link
Contributor

gyliu513 commented Dec 6, 2019

I also encounter the same issue and I was using olm 0.13.0 deployed on KIND.

root@gyliu-dev1:~# kubectl delete subscription -n marketplace myolm-operator-subsription
subscription.operators.coreos.com "myolm-operator-subsription" deleted
root@gyliu-dev1:~# kubectl get csv -n marketplace
NAME                        DISPLAY              VERSION   REPLACES                    PHASE
memcached-operator.v0.0.3   Memcached Operator   0.0.3     memcached-operator.v0.0.2   Succeeded
root@gyliu-dev1:~# kubectl get ip -n marketplace
No resources found.
root@gyliu-dev1:~# kubectl get pods -n marketplace
NAME                                            READY   STATUS    RESTARTS   AGE
marketplace-operator-69756457d8-c8vrp           1/1     Running   0          20h
memcached-operator-d75d9674-7xnp9               1/1     Running   0          20h
myolm-operators-589c966976-qp4m9                1/1     Running   0          20h
upstream-community-operators-6778c46cc7-gq29b   1/1     Running   0          20h
root@gyliu-dev1:~# kind version
kind v0.6.0 go1.13.4 linux/amd64
root@gyliu-dev1:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-16T01:01:59Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

@njhale
Copy link
Member

njhale commented Dec 6, 2019

This is expected behavior. Deleting a Subscription should not delete the operator it installed. The wording in that document is incorrect. Further down, it explains that deleting an operator also requires the manual deletion of the CSV.

I'm going to notify a member of the OpenShift docs team and close this issue once we have it tracked on that side.

@adellape how do we go about getting these docs amended?

@clyang82
Copy link
Contributor Author

clyang82 commented Dec 9, 2019

@njhale Thanks for your confirmation that delete an operator requires the manual deletion of the CSV.

@adellape
Copy link

@njhale Thanks, opened openshift/openshift-docs#18632 to address.

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

Successfully merging a pull request may close this issue.

5 participants