-
Notifications
You must be signed in to change notification settings - Fork 144
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
DeleteVolume() fails to cleanup volume if it contains read-only subdir #834
Comments
we are using csi-driver-smb/pkg/smb/controllerserver.go Line 227 in 54c6421
|
os.RemoveAll() fails if at least one subdir doesn't have write permissions. See kubernetes-csi#834.
|
os.RemoveAll() fails if at least one subdir doesn't have write permissions. See kubernetes-csi#834.
What happened:
When deleting a Pod with PV with "Delete" reclaim policy, DeleteVolume() attempts to cleanup volume, but fails if it contains a directory without write permissions. PV got stuck in "Released" status and reports error:
Inside SMB server, corresponding volume is also not deleted:
What you expected to happen:
Both PV object and a share on SMB server must be deleted (the same way as it happens without read-only subdir).
How to reproduce it:
Create StorageClass:
for a samba server from https://github.com/samba-in-kubernetes/samba-container .
Create a Pod requesting samba PV:
Create read-only subdir inside the Pod, then delete Pod and PVC:
PV is not deleted:
It reports error:
And read-only dir still exists inside samba server:
Anything else we need to know?:
Environment:
CSI Driver version: Image manually built by
docker build ... -f ./cmd/smbplugin/Dockerfile .
from the top of upstream master branch (commit 4d10e97 of https://github.com/kubernetes-csi/csi-driver-smb.git)Kubernetes version (use
kubectl version
):The text was updated successfully, but these errors were encountered: