-
Bug
-
Resolution: Done
-
Major
-
3.2.0.GA
-
False
-
None
-
False
-
-
Description of problem:
On ARO 4.10.20 and Devspaces 3.2, when removing the devspaces checluster and operator from the cluster through the webconsole, there are resource from the install that are not cleaned up
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Install devspaces through the operatorhub
- Create a new namespace 'devspaces' and create a new checluster resource in the naemspace
- Wait for devspaces to be available, log in and create a workspace
- stop the workspace and uninstall the checluster resource
oc -n devspaces delete checluster devspaces
- Observe that the pods for the checluster are not removed even though they are owned by the now missing checluster
oc -n devspaces get po NAME READY STATUS RESTARTS AGE che-gateway-9758fd4f9-drlgf 4/4 Running 0 12m devfile-registry-56f9fb547f-h5swc 1/1 Running 0 13m devspaces-7f868cf8bd-cqnfj 1/1 Running 0 12m devspaces-dashboard-76b57975c7-jw5wn 1/1 Running 0 13m plugin-registry-7dc7d45df8-rm4n6 1/1 Running 0 13m postgres-ddb6d4577-qjs7n 1/1 Running 0 14m
- delete the devspaces project and any user devspace projects
- uninstall the devspaces operator from the webconsole
- Follow the instructions from [here|
https://docs.openshift.com/container-platform/4.11/web_console/odc-about-web-terminal.html#deleting-the-devworkspace-operator-dependency] to remove the devworkspace operator - In step 1 observe that the workspace routings are never removed when running the command (the only way I have found to remove these cleanly is to have the user delete their workspaces while the checluster is still running)
oc delete devworkspaceroutings.controller.devfile.io --all-namespaces --all --wait
- delete the finalizers in each devworkspace routing and continue instructions to remove devworkspace operator. the rest of the removal steps complete sucessfully
- Run the following command to list all related resource that have not been removed yet
oc get $(oc api-resources --verbs=list -o name | awk '{printf "%s%s",sep,$0;sep=","}') --ignore-not-found -A -o=custom-columns=KIND:.kind,NAME:.metadata.name,NAMESPACE:.metadata.namespace --sort-by='kind' | grep 'devw\|eclipse\|worksp\|devsp' | grep -v '^Event\|^APIRequestCount\|^PackageManifest'
Actual results:
- Resources owned by the checluster are not removed when the checluster is deleted
- workspaceroutings are never deleted unless you delete the workspace through the devspaces web console or remove the finalizer block
- the following items still exist on the server after removing the two operators
APIService v2.org.eclipse.che <none> APIService v1.org.eclipse.che <none> ClusterRole checlusters.org.eclipse.che-v2-view <none> ClusterRole checlusters.org.eclipse.che-v2-edit <none> ClusterRole checlusters.org.eclipse.che-v2-crdview <none> ClusterRole checlusters.org.eclipse.che-v2-admin <none> ClusterRole checlusters.org.eclipse.che-v1-view <none> ClusterRole checlusters.org.eclipse.che-v1-edit <none> ClusterRole checlusters.org.eclipse.che-v1-crdview <none> ClusterRole checlusters.org.eclipse.che-v1-admin <none> ClusterRole devworkspace-controller-edit-workspaces <none> ClusterRole devworkspace-controller-metrics-reader <none> ClusterRole devworkspace-controller-view-workspaces <none> ClusterRole checlusters.org.eclipse.che-v1-admin <none> ClusterRole checlusters.org.eclipse.che-v1-crdview <none> ClusterRole checlusters.org.eclipse.che-v1-edit <none> ClusterRole checlusters.org.eclipse.che-v1-view <none> ClusterRole checlusters.org.eclipse.che-v2-admin <none> ClusterRole checlusters.org.eclipse.che-v2-crdview <none> ClusterRole checlusters.org.eclipse.che-v2-edit <none> ClusterRole checlusters.org.eclipse.che-v2-view <none> ClusterRole devworkspace-controller-edit-workspaces <none> ClusterRole devworkspace-controller-metrics-reader <none> ClusterRole devworkspace-controller-view-workspaces <none> ConfigMap e79b08a4.org.eclipse.che openshift-operators CustomResourceDefinition checlusters.org.eclipse.che <none> Lease e79b08a4.org.eclipse.che openshift-operators OAuthClientAuthorization Mike.Yarbrough@brighthousefinancial.com:devspaces-client <none> Operator devworkspace-operator.openshift-operators <none> Operator devspaces.openshift-operators <none> RoleBinding devspaces-operator-service-auth-reader kube-system RoleBinding devworkspace-controller-manager-service-auth-reader kube-system RoleBinding devworkspace-controller-manager-service-auth-reader kube-system RoleBinding devspaces-operator-service-auth-reader kube-system
Expected results:
- Resource owned by the checluster are removed when the checluster is deleted
- devworkspaceroutings can be deleted via the openshift cli
- No related resources exist on the cluster after removing both operators via the web console and cli
Reproducibility (Always/Intermittent/Only Once):
Build Details:
Additional info (Such as Logs, Screenshots, etc):
- is incorporated by
-
CRW-3521 dsc tool leaves a few items behind after uninstalling
- Resolved