Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3522

Removing Devspaces operator from web console leaves items behind

    XMLWordPrintable

Details

    • False
    • None
    • False

    Description

      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

      1. Install devspaces through the operatorhub
      2. Create a new namespace 'devspaces' and create a new checluster resource in the naemspace
      3. Wait for devspaces to be available, log in and create a workspace
      4. stop the workspace and uninstall the checluster resource 
        oc -n devspaces delete checluster devspaces
      1. 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
      
      1. delete the devspaces project and any user devspace projects
      2. uninstall the devspaces operator from the webconsole
      3. 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
      4. 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
      1. delete the finalizers in each devworkspace routing and continue instructions to remove devworkspace operator. the rest of the removal steps complete sucessfully
      2. 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:

      1. Resources owned by the checluster are not removed when the checluster is deleted
      2. workspaceroutings are never deleted unless you delete the workspace through the devspaces web console or remove the finalizer block
      3. 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:

      1. Resource owned by the checluster are removed when the checluster is deleted
      2. devworkspaceroutings can be deleted via the openshift cli
      3. 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):

       

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              abazko Anatolii Bazko
              myarbrou@redhat.com Michael Yarbrough
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: