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

Storageclass name for PVC is not getting set for workspaces being created by checluster #21807

Closed
ghost opened this issue Nov 8, 2022 · 8 comments
Assignees
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach

Comments

@ghost
Copy link

ghost commented Nov 8, 2022

Describe the bug

I have deployed eclipse-che 7.56.x successfully on on prem k8s cluster (1 master, 1 worker). All the pods are assigned to worker node only.

the storageclass name passed in the checluster is not set to the PersistentVolumeClaim (claim-devworkspace) created by che when i created the sample workspace.

CR path file :-

apiVersion: org.eclipse.che/v2
spec:
  components:
    database:
      pvc:
       storageClass: postgres-storage
  devEnvironments:
    storage:
      pvcStrategy: per-user
      perUserStrategyPvcConfig:
              storageClass: workspace-storage
  networking:
    auth:
      identityProviderURL: 'http://dex.dex:5556'
      oAuthClientName: "clientname"
      oAuthSecret: 'secret'

PVs:-

NAME                  CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                       STORAGECLASS        REASON   AGE
postgres-pv-volume    1Gi        RWO            Retain           Bound       eclipse-che/postgres-data   postgres-storage             126m
workspace-pv-volume   20Gi       RWO            Retain           Available                               workspace-storage            136m

Comparison of postgres-data and username-che workspace PVCs : -

Namespace:     admin-che
**StorageClass**:
Status:        Pending
Volume:
Labels:        <none>
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Used By:       workspace7ebd5e269d544ff1-7bc4c4768f-kwsv2
Events:
  Type    Reason         Age                  From                         Message
  ----    ------         ----                 ----                         -------
  Normal  FailedBinding  3m7s (x42 over 13m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set


Name:          postgres-data
Namespace:     eclipse-che
**StorageClass:  postgres-storage**
Status:        Bound
Volume:        postgres-pv-volume
Labels:        app.kubernetes.io/component=postgres
               app.kubernetes.io/instance=che
               app.kubernetes.io/managed-by=che-operator
               app.kubernetes.io/name=che
               app.kubernetes.io/part-of=che.eclipse.org
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       postgres-5c84d97768-w4hql
Events:        <none>

Che version

7.56@latest

Steps to reproduce

  1. Setup K8s cluster on Ubuntu VMs.
  2. Install DEX as OIDC and configure the OIDC parameters for kube-apiserver
  3. Install Che using the below command
    chectl server:deploy --platform k8s --domain=abc.example.com --postgres-pvc-storage-class-name=postgres-storage --workspace-pvc-storage-class-name=workspace-storage --che-operator-cr-patch-yaml cr-patch.yaml
  4. open che dashboard and create any sample workspace for example. empty workspace.

Expected behavior

Workspace pods should be running
Persistent Volume claim by che should be bound to PVs and able to access workspace in dashboard successfully.

Runtime

Kubernetes (vanilla)

Screenshots

No response

Installation method

chectl/latest

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@ghost ghost added the kind/bug Outline of a bug - must adhere to the bug report template. label Nov 8, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 8, 2022
@ghost ghost changed the title Storageclass name is getting set for workspaces from checluster Storageclass name is getting set for sample workspaces being created by checluster Nov 8, 2022
@ibuziuk ibuziuk added the severity/P1 Has a major impact to usage or development of the system. label Nov 8, 2022
@ghost ghost changed the title Storageclass name is getting set for sample workspaces being created by checluster Storageclass name is not getting set for sample workspaces being created by checluster Nov 8, 2022
@ibuziuk ibuziuk added area/devworkspace-operator status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach sprint/next and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 8, 2022
@ghost ghost changed the title Storageclass name is not getting set for sample workspaces being created by checluster Storageclass name is not getting set for workspaces being created by checluster Nov 8, 2022
@ghost ghost changed the title Storageclass name is not getting set for workspaces being created by checluster Storageclass name for PVC is not getting set for workspaces being created by checluster Nov 8, 2022
@amisevsk
Copy link
Contributor

amisevsk commented Nov 8, 2022

Could you please provide the contents of the devworkspace-config devworkspaceoperatorconfig in the Che install namespace?

kubectl get dwoc devworkspace-config -n eclipse-che

@ghost
Copy link
Author

ghost commented Nov 8, 2022

kubectl get dwoc devworkspace-config -n eclipse-che -o yaml

apiVersion: controller.devfile.io/v1alpha1
config:
  workspace:
    defaultStorageSize:
      perWorkspace: 5Gi
    storageClassName: workspace-storage
kind: DevWorkspaceOperatorConfig
metadata:
  creationTimestamp: "2022-11-08T07:39:50Z"
  generation: 2
  name: devworkspace-config
  namespace: eclipse-che
  ownerReferences:
  - apiVersion: org.eclipse.che/v2
    blockOwnerDeletion: true
    controller: true
    kind: CheCluster
    name: eclipse-che
    uid: a03ae0a7-7f76-4fa6-b6ab-785a6d98db83
  resourceVersion: "1866025"
  uid: e5be59d5-b353-4abe-9728-e3b22485bd7d

@amisevsk
Copy link
Contributor

amisevsk commented Nov 8, 2022

And DevWorkspaces you create through the dashboard are not using the workspace-storage storageClass? Note existing workspaces will not be switched in order to avoid losing data, so only new workspaces are considered.

@ghost
Copy link
Author

ghost commented Nov 9, 2022

Yes correct, it is only about new workspaces only. I am new to eclipse-che and don't have any existing workspaces for this.

@ghost
Copy link
Author

ghost commented Nov 9, 2022

Compared 7.55.0 vs 7.56.0 - This issue is not happening in 7.55.0 and I decided to go with that version for now.

Uninstalled che 7.56.0 running chectl server:delete --delete-all --delete-namespace
Uninstalled chectl CLI from my Liunx VM machine

Installed chectl CLI version 7.55.0 manually and again installed che 7.55.0 successfully using the below command and able to launch a workspace successfully and also please refer the PV in Bound status.

chectl server:deploy --platform k8s --domain=abc.example.com --postgres-pvc-storage-class-name=postgres-storage --workspace-pvc-storage-class-name=workspace-storage --che-operator-cr-patch-yaml cr-patch.yaml --skip-oidc-provider-check --skip-cert-manager

kubectl get pv
NAME                  CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                         STORAGECLASS        REASON   AGE
postgres-pv-volume    1Gi        RWO            Retain           Bound    eclipse-che/postgres-data                     postgres-storage             21m
workspace-pv-volume   20Gi       RWO            Retain           Bound    admin-che/storage-workspacedb540550934f4b95   workspace-storage            22h

kubectl describe pvc --all-namespaces
Name:          storage-workspacedb540550934f4b95
Namespace:     admin-che
StorageClass:  workspace-storage
Status:        Bound
Volume:        workspace-pv-volume
Labels:        <none>
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      20Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       workspacedb540550934f4b95-854f8659bd-g64vn
Events:        <none>


Name:          postgres-data
Namespace:     eclipse-che
StorageClass:  postgres-storage
Status:        Bound
Volume:        postgres-pv-volume
Labels:        app.kubernetes.io/component=postgres
               app.kubernetes.io/instance=che
               app.kubernetes.io/managed-by=che-operator
               app.kubernetes.io/name=che
               app.kubernetes.io/part-of=che.eclipse.org
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       postgres-74d68dfcc6-gl5fl
Events:        <none>

@AObuchow
Copy link

@vazhagesan I was able to reproduce the issue you described on Eclipse Che 7.56. The issue has now been resolved, and the fix appears in Eclipse Che 7.57 - you can download the 7.57 version of chectl here to try it out.

If you have the chance, please confirm if updating to the 7.57 release fixes your issue so that we can close this issue. Thank you :)

@ghost
Copy link
Author

ghost commented Nov 28, 2022

@AObuchow Great and thanks for the update. I will check and confirm.

@ibuziuk
Copy link
Member

ibuziuk commented Dec 13, 2022

@vazhagesan hello, have you got a chance to verify against the latest version of Eclipse Che?
can the issue be closed now? thanks

@ibuziuk ibuziuk closed this as completed Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Projects
None yet
Development

No branches or pull requests

4 participants