kubernetes: Pod with NFS volume attached cannot be terminated
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug
What happened: When trying to delete a nfs-volume pod it gets stuck in “Terminating” state.
What you expected to happen: The pod should be deleted
How to reproduce it (as minimally and precisely as possible):
- Create one namespace called: e2e-tests-kubelet-bugtest1
- Create a second namespace called: e2e-tests-kubelet-bugtest2
- Create a new nfs-server pod using the nfs-server.yaml
- Add the ip of the nfs-server pod to the pod-nfs-vol.yaml
- Create a second pod using the pod-nfs-volume.yaml
- Delete the nfs-server pod without stopping the server
- Try to delete pod-nfs-volume pod.
Anything else we need to know?: Recreating this using YAML files is easier (and possibly more accurate):
- nfs-server: https://paste.ubuntu.com/p/ZC2dj4SQbh/
- pod-nfs-volume: https://paste.ubuntu.com/p/YVd6Txc299/
Environment:
-
Kubernetes version (use
kubectl version
):-
Client Version: version.Info{Major:“1”, Minor:“9”, GitVersion:“v1.9.3”, GitCommit:“d2835416544f298c919e2ead3be3d0864b52323b”, GitTreeState:“clean”, BuildDate:“2018-02-07T12:22:21Z”, GoVersion:“go1.9.2”, Compiler:“gc”, Platform:“linux/amd64”}
-
Server Version: version.Info{Major:“1”, Minor:“11”, GitVersion:“v1.11.1”, GitCommit:“b1b29978270dc22fecc592ac55d903350454310a”, GitTreeState:“clean”, BuildDate:“2018-07-17T18:43:26Z”, GoVersion:“go1.10.3”, Compiler:“gc”, Platform:“linux/amd64”}
-
-
Cloud provider or hardware configuration:
- Windows server 1803 nodes
-
OS (e.g. from /etc/os-release):
- NAME=“Ubuntu”
- VERSION=“16.04.3 LTS (Xenial Xerus)”
- ID=ubuntu
- ID_LIKE=debian
- PRETTY_NAME=“Ubuntu 16.04.4 LTS”
- VERSION_ID=“16.04”
-
Kernel (e.g.
uname -a
):- Linux k8s-master-28549959-0 4.15.0-1013-azure #13~16.04.2-Ubuntu SMP Wed May 30 01:39:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (7 by maintainers)
You need to delete the nfs-clients before you delete the nfs-server otherwise client unmount will hang.