-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Deleting devworkspace failed - Cannot remove folder projects/plugins: Permission denied #20965
Comments
Hi @nils-mosbach, thanks for your report! From your comment in #20963, it sounds like this is for a bare-metal cluster -- is that correct? I know bare-metal clusters have caused issues in the past for Che. If you have the reproducer still running, could you inspect the filesystem in the workspace PVC? One easy way to do this is (in the namespace where the failed workspace was running
Edit to add: could you also list the user info when running the cleanup pod? From within the bash shell in step 3, run |
sure. Yes that's correct we are running a 3 node cluster provisioned using Rancher. Storage also comes tricky if you run everything on your own. At the beginning we experimented quite a lot with several storage solutions. What worked best from a performance and ease of use standpoint was linbit Linstor which is a distributed block storage implementation on top of drbd. What we have now are 27 SSDs (9 each) and a dedicated network for async storage replication.
I've also tried deleting the 2 folders in the pod |
Interesting -- those directories are automatically created by Kubernetes when they're mounted. For example, the
To process this volumeMount, Kubernetes creates the path From the cleanup pod, are there any files/directories inside The reason this issue isn't present when DevWorkspaces are disabled is that Che has a workaround for a different issue (see this ancient discussion). With DevWorkspaces enabled, we work around it in a different way. I'm not familiar with Linstor, but is it possible to configure how these paths are created? The documentation also mentions that it supports fsGroup, which may workaround the problem (but I'd need to consider impacts in other configurations). I've created issue devfile/devworkspace-operator#718 which may help the situation, but I can't guarantee the suggestion there would resolve all problems here. |
Your're right. Project and Plugin directories are empty. I guess setting fsGroup to 1234 will solve the issue in our case. Devfile 1 workspaces that are provisioned by che server contain a security context that sets fsGroup in our case. apiVersion: apps/v1
kind: Deployment
metadata:
...
labels:
che.original_name: workspace
che.workspace_id: workspaceqhfe30ptcyxjzhm2
name: workspaceqhfe30ptcyxjzhm2.workspace
namespace: dev-studio-workspace-mosbachn
resourceVersion: "293281914"
uid: 67ac129b-feb1-41d0-804a-2ea332bf967e
spec:
template:
spec:
securityContext:
fsGroup: 1724
runAsUser: 1724
... I tried to validate this by manually setting the value using kubectl. I stopped DevWorkspace-Controller and manually set the fsGroup to 1234 on the workspace pod. Theia loads as expected and projects sources can be cloned. ...
securityContext:
fsGroup: 1234
runAsGroup: 0
runAsNonRoot: true
runAsUser: 1234 I can't check wether that solves deleting workspaces, since devworkspace operator will "correct" my change during reconcillation but theia loads as expected. (so this might also solve #20963 as you'd expected.) |
@nils-mosbach That's great to hear! I can look into doing the same as we do for Devfile 1 workspaces in the new year -- I'll be on holiday for a bit. The change to make would happen here in case you need a fix urgently |
PR devfile/devworkspace-operator#748 is open now, which sets |
Next branch of the devworkspace operator solves the issue in my case. Thanks! |
I have the same issue with Eclipse Che installed on ews. |
@martinelli-francesco I'm not sure which catalogsource chectl is using, but the fix should be released to all platforms in a week or two (depending on release pipeline). If it's needed sooner, it's already available in the upstream DevWorkspace Operator catalog On Kubernetes, I'm not sure, but you're looking for DevWorkspace Operator v0.12.0 and higher. |
Describe the bug
Devworkspace operator seems to fail deleting devworkspaces due to volume permissions.
Che version
7.40@latest
Steps to reproduce
Start a new devfile 2 workspace with devworkspaces enabled.
Delete workspace using dashboard.
Expected behavior
Workspace gets deleted.
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
chectl/latest
Environment
Linux
Eclipse Che Logs
No response
Additional context
Had to remove finalizer from devworkspace cr in order to get everything deleted.
The text was updated successfully, but these errors were encountered: