-
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
Remove generic mount validation logic during unmount and rely on CSI driver #72008
Conversation
@oleksiys: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Hi @oleksiys. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The change was introduced in this PR #56836 |
I signed it |
/assign @saad-ali |
// see https://github.com/kubernetes/kubernetes/pull/56836#discussion_r155834524 | ||
mounted, err := isDirMounted(c.plugin, dir) | ||
if err != nil { | ||
klog.Error(log("unmounter.Teardown failed while checking mount status for dir [%s]: %v", dir, err)) |
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.
How about rather than completely removing this check, if directory does not exist at all we do a fast return without calling CSI but if it does exist(mounted or not), we make the CSI call. This is what we do with flexvolume and it appears to have worked well in practice. cc @vladimirvivien
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.
I wonder if this way we won't violate a lifecycle contract that for NodePublishVolume
we must call NodeUnpublishVolume
(at least once) so CSI driver have a chance to release resources even in situation when the actual mount point was deleted.
/ok-to-test |
This addresses #56836 (comment) /lgtm We should cherry pick this to 1.13. /hold Will let @gnufied @vladimirvivien review this. If they are ok with it, they can remove the hold. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oleksiys, saad-ali 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 |
Since you are touching this code, could you also fix #72252 in this PR. |
@oleksiys cloud you delete https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/csi/csi_mounter.go#L381 too in your commit? |
b95ca6c
to
acabed4
Compare
/hold cancel |
err, can you squash the commits please? since both commits are made to the same file, it seems pointless. /lgtm cancel |
/release-note-none |
…2008-upstream-release-1.13 Automated cherry pick of #72008: Fix CSI volume unmount and cleanup logic
Remove generic mount validation logic during unmount and rely on CSI driver ref: kubernetes#72008 See merge request !206664
What type of PR is this?
/kind bug
What this PR does / why we need it:
We remove a piece of generic logic which may not work with all the drivers and instead rely on CSI driver to run the teardown logic and report an error.
I faced an issue with a fuse mounted volume. After the fuse process responsible for the mount died, every time k8s or application tried to access the mounted volume it got an error "transport endpoint is not connected". I couldn't find a way to recover the fuse mount after that, the only thing I could do was unmount the volume. But once this happens you cannot release the volume anymore, because CSI driver which knows how to unmount the volume is never called because the check inside the
TearDownAt
function always fails.I propose to remove that logic and rely on CSI driver's unmount logic.
/sig storage