Skip to content
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

Merged
merged 1 commit into from
Jan 7, 2019

Conversation

oleksiys
Copy link
Contributor

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

@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/storage Categorizes an issue or PR as relevant to SIG Storage. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 13, 2018
@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2018
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@oleksiys
Copy link
Contributor Author

The change was introduced in this PR #56836

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 13, 2018
@oleksiys
Copy link
Contributor Author

I signed it
/check-cla

@oleksiys
Copy link
Contributor Author

/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))
Copy link
Member

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

Copy link
Contributor Author

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.

@gnufied
Copy link
Member

gnufied commented Dec 13, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2018
@saad-ali
Copy link
Member

This addresses #56836 (comment)

/lgtm
/approve

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Dec 20, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2018
@saad-ali
Copy link
Member

Since you are touching this code, could you also fix #72252 in this PR.

@zhangxiaoyu-zidif
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2019
@oleksiys oleksiys force-pushed the master branch 2 times, most recently from b95ca6c to acabed4 Compare January 3, 2019 00:38
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2019
@oleksiys
Copy link
Contributor Author

oleksiys commented Jan 3, 2019

@gnufied @saad-ali PTAL

@gnufied
Copy link
Member

gnufied commented Jan 5, 2019

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 5, 2019
@gnufied
Copy link
Member

gnufied commented Jan 5, 2019

err, can you squash the commits please? since both commits are made to the same file, it seems pointless.

/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2019
@gnufied
Copy link
Member

gnufied commented Jan 7, 2019

/release-note-none
/lgtm

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 7, 2019
@k8s-ci-robot k8s-ci-robot merged commit ee10b45 into kubernetes:master Jan 7, 2019
k8s-ci-robot added a commit that referenced this pull request Oct 2, 2019
…2008-upstream-release-1.13

Automated cherry pick of #72008: Fix CSI volume unmount and cleanup logic
mars1024 pushed a commit to mars1024/kubernetes that referenced this pull request Nov 26, 2019
Remove generic mount validation logic during unmount and rely on CSI driver

ref: kubernetes#72008

See merge request !206664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants