-
Notifications
You must be signed in to change notification settings - Fork 711
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
kubeadm unmounts /var/lib/kubelet #1294
Comments
Was asked to post this here kubernetes/kubernetes#71638 |
the path is intended for cleanup here:
yes, the unmount is a pre-step.
this could be part of the problem, but i don't think it should happen because of symlinks. |
@neolit123 I did some more testing and it seems like this only happens when there are no pod mounts setup. i.e none of these
I ran this command https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/cmd/reset.go#L159 and when there are pods mounted it returns:
however with no pods mounted it returns this
As you can see it wants to unmount The command probably should be changed to this as it won't contain the mounted path
There is an extra |
i think this makes sense, yes. |
@neolit123 yep, will do /assign |
'kubeadm reset' uses incorrect way of unmounting /var/lib/kubelet directories. It queries /proc/mounts for /var/lib/kubelet mount point. If /var/lib/kubelet directory is also mounted it makes 'kubelet reset' to unmount it too, which is incorrect. It also makes it fail as it can't unmount /var/lib/kubelet before unmounting mounts inside it. Fixed by querying /var/lib/kubelet/ instead of /var/lib/kubelet. This should exclude /var/lib/kubelet from the query results even if it's mounted. Fixes: kubernetes/kubeadm#1294
All, thanks so much. We just encountered this issue on Kubernetes 1.11.5. We are also supporting Kubernetes 1.10.11 installation and it also has this problem. So if you guys can get a patch in for 1.10, 1.11, 1.12, & 1.13 that would be ideal. Thanks again as this was driving us crazy |
What happened:
kubeadm reset unmounts /var/lib/kubelet instead of just emptying the directory
What you expected to happen:
The directory to be emptied instead of unmounted
How to reproduce it (as minimally and precisely as possible):
/data/var/lib/kubelet
/var/lib/kubelet
to /data/var/lib/kubelet`kubeadm init
kubeadm reset
My setup uses a symlink to the mount point, I am not sure if the bug still happens when
/var/lib/kubelet
is mounted directly,Anything else we need to know?:
Environment:
kubectl version
):1.12.3
bare metal with disks to mount
CentOS Linux release 7.5.1804 (Core)
uname -a
):4.19.5-1.el7.elrepo.x86_64
/kind bug
The text was updated successfully, but these errors were encountered: