Expect pod to be deleted when accessing a nfs vol?

12 views
Skip to first unread message

Jeff Vance

unread,
Feb 8, 2017, 7:52:41 PM2/8/17
to Kubernetes developer/contributor discussion
I'm using an nfs-server pod, from "gcr.io/google_containers/volume-nfs:0.8", and I create a client pod which accesses the nfs volume, keeping it open for write access, via the container executing `exec 9>/mnt/FOO; sleep 6000`. Then I delete the nfs-server pod (waiting for it to terminate), followed by deleting the client pod.  The nfs-server pod is deleted but the client pod hangs in "Terminating" -- 15 minutes later the client pod's Phase is still "Running", and `kubectl describe po -n e2e-tests-kubelet-4c7tc  pod-nfs-vol-l442x` and `kubectl logs...`show no events. The pod's nfs vol mount is present on the host.

If I replace the container's `exec 9>/mnt/FOO; sleep 6000` command with `while true; do echo FeFieFoFum >>/mnt/SUCCESS; sleep 1; cat /mnt/SUCCESS; done`, the deletion of the client pod works.

Should I be able to delete a pod while it is accessing a nfs volume?

Thanks,
Jeff


Andy Goldstein

unread,
Feb 8, 2017, 8:42:04 PM2/8/17
to Jeff Vance, Kubernetes developer/contributor discussion
Hey Jeff, this all comes back to https://github.com/kubernetes/kubernetes/issues/31272. Until that is resolved, this is the behavior we have.

Andy

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/6039103e-2a86-4c24-a569-309e32fb8e55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Vance

unread,
Feb 8, 2017, 9:52:14 PM2/8/17
to Andy Goldstein, Kubernetes developer/contributor discussion
Hi Andy,

Thanks. In that issue the kubelet is un-wedged when the nfs-server is restarted.
In my test, even after "restarting" [1] the nfs-server, the client pod's host still has the nfs vol mounted, and the client pod is not deleted. However, if the client pod doesn't access the nfs vol, or if it does access the vol in a loop with a `sleep`[2], then the client pod is deleted.

[1] `/usr/sbin/rpc.nfsd 1` executed on nfs-server pod to restart the nfs server.
"Stopping" the nfs-server is done by executing `/usr/sbin/rpc.nfsd 0`
[2] `while true; do echo FeFieFoFum >>/mnt/SUCCESS; sleep 1; cat /mnt/SUCCESS; done`

Jeff
> > email to kubernetes-de...@googlegroups.com.
> > To post to this group, send email to kuberne...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/
> > msgid/kubernetes-dev/6039103e-2a86-4c24-a569-309e32fb8e55%
> > 40googlegroups.com
> > <https://groups.google.com/d/msgid/kubernetes-dev/6039103e-2a86-4c24-a569-309e32fb8e55%40googlegroups.com?utm_medium=email&utm_source=footer>
> > .
Reply all
Reply to author
Forward
0 new messages