-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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: properly umount dirs in /var/lib/kubelet #71663
kubeadm: properly umount dirs in /var/lib/kubelet #71663
Conversation
'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
/cc @neolit123 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bart0sh
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @bart0sh
/priority important-longterm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bart0sh, neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
Previous PR that fixes this kubernetes#71663 Signed-off-by: Thomas Tanaka <thomas.tanaka@gmail.com>
What type of PR is this?
/kind bug
What this PR does / why we need it:
'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.
Which issue(s) this PR fixes:
Fixes: kubernetes/kubeadm#1294
Does this PR introduce a user-facing change?: