-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Mark a volume as uncertain-attached after detach error #120595
Conversation
Volume that failed Detach() should not be marked as attached, CSI external-attacher is probably still trying to detach it. Mark it uncertain instead and wait for Detach() to succeed.
e974879
to
7fc11f4
Compare
/assign @jingxu97 |
I was mainly checking the case mentioned here, to make sure it won't cause issue like volume is never reported as attached again. Since uncertain should always trigger attach operation, which will make a call of AddVolumeToReportAsAttached, I don't think there is an issue. Overall I think it is safer to mark volume as uncertain when there is a failure, especially when we don't know it is transient or not. Thanks @jsafrane for the great analysis of this tricky issue and provide the fix. |
/lgtm |
LGTM label has been added. Git tree hash: 3221fd9de0bb548b316747c7d6c5b8aa20d3e42e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingxu97, jsafrane, kvaps 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-required |
/priority important-soon |
…0595-upstream-release-1.26 Automated cherry pick of #120595: Mark a volume as uncertain-attached after detach error
…0595-upstream-release-1.27 Automated cherry pick of #120595: Mark a volume as uncertain-attached after detach error
…0595-upstream-release-1.28 Automated cherry pick of #120595: Mark a volume as uncertain-attached after detach error
What type of PR is this?
/kind bug
What this PR does / why we need it:
A volume that failed
Detach()
should not be marked as attached, CSI external-attacher is probably still trying to detach it.Mark it uncertain instead and wait for
Detach()
to succeed. I updated an existing unit test for it.Which issue(s) this PR fixes:
Fixes #120571
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: