fstab / cifs

CIFS Flexvolume Plugin for Kubernetes
MIT License
212 stars 49 forks source link

Unable to umount the the smb share from pod when the pod is deleted and the pod is stuck in terminating state #7

Closed ankursheth closed 5 years ago

fstab commented 5 years ago

The best way to debug this is to uncomment these lines at the top of the script:

echo >> /tmp/cifs.log
date >> /tmp/cifs.log
echo "$@" >> /tmp/cifs.log

Then you should find a file /tmp/cifs.log that shows how the script was called. If the script is called with parameter unmount there might be an issue with the script, but if there is no call with parameter unmount then this might be a Kubernetes issue unrelated to this script.

doncams commented 5 years ago

I am facing a similar issue where the smb share is not unmounted.

ankursheth commented 5 years ago

I was able to debug the issue and that had to do with the wait time for pod deletion and kubernetes cluster setup. closing this issue, as its resolved., thanks @fstab for your comments and suggestions, it helped to resolve the issue.

dash042 commented 5 years ago

I have this issue - pods using the cifs plugin all get stuck "terminating" the only information in the log is: unmount /var/lib/kubelet/pods/1e577dbc-c434-11e9-aecd-0050569d4986/volumes/fstab~cifs/cifs and this repeats EVERY couple of seconds... so far without end in sight

manually unmounting - i.e.: $VOLUME_PLUGIN_DIR/fstab~cifs/cifs unmount /var/lib/kubelet/pods/618f50ba-c5ba-11e9-8b55-0050569d4986/volumes/fstab~cifs/cifs results in:

{"status":"Failure","message":"cifs unmount: no filesystem mounted under directory: '/var/lib/kubelet/pods/618f50ba-c5ba-11e9-8b55-0050569d4986/volumes/fstab~cifs/cifs'"}

servo1x commented 5 years ago

@ankursheth what was the fix?

changbowen commented 4 years ago

for me according to the logs of kubelet it stuck on trying to unmount some old mount point that was unmounted manually. And fails, stuck in retry loop. I think the problem is doUnmount() should not consider the unmount for non-existing mount point a failure. For example what Microsoft does in their cifs plugin is to return Success when the mount doesn't exist.

mnavarretem86 commented 2 years ago

someone found the solution?