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
fix: stale smb unmount issue when smb file share is deleted #1568
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx 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 |
a4d4856
to
373907a
Compare
af2bf38
to
28b6774
Compare
/retest |
5 similar comments
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
@andyzhangx: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
/cherrypick release-1.29 |
@andyzhangx: #1568 failed to apply on top of branch "release-1.29":
In response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix: state smb unmount issue when smb file share is deleted and then unmount
related to fix: kubernetes/kubernetes#121851
there is behavior change from linux kernel
5.15.0-1051-azure
(or earlier version), when smb file share is deleted, the upstream mount-utils depends on following logic to check whether smb mount is in stale state, while starting from the former kernel version, it returnsresource temporarily unavailable
error instead ofErrNotExist
, thus this PR tries to add a new judgement in the mount-utils inIsCorruptedMnt
func, hereEWOULDBLOCK
isresource temporarily unavailable
error.original logic (won't work now since it now returns it returns
resource temporarily unavailable
error instead ofErrNotExist
in kernel)https://github.com/kubernetes/kubernetes/blob/a95a79c785ec449074afc689306d1155aa039025/staging/src/k8s.io/mount-utils/mount_helper_unix.go#L188-L198
currunt error message is like following:
workaround
force delete the pod
impact
This issue does not only break CSI drivers, it also breaks on pods with subPath smb volume, error msg is like following, this requires a patch version fix of kubelet since subPath unmount does not go through CSI driver.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: