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 race condition between external-resizer and kubelet #123055
Conversation
This fixes the race condition that could happen because resize controller just finished volume expansiona and has only finished marking PV and yet to mark PVC. The workaround proposed here should not be necessary once RecoverVolumeExpansionFailure goes GA/beta.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied 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 |
/sig storage |
/kind bug |
The PR looks good to me, but I wonder why there is no check (I might have missed that) on the CSI spec NodeServiceCapability EXPAND_VOLUME type. I expect that such a check nicely prevents #117871 from happening, although probably not the race from #115294... |
@gnufied It seems the fix done here is not resolving the exact issue #115294. In current fix, we are not checking for In case of #115294, we have |
@akankshapanse https://github.com/kubernetes-csi/external-resizer/blob/master/pkg/controller/controller.go#L461 Is where we are checking for return value from A proper fix for this issue requires additional state on PVC and hence we will need If your driver has both |
That is the same capability we are using in this PR to return early, so we are using that feature. |
Updated the wording about #115294 not getting really fixed here. |
/lgtm |
LGTM label has been added. Git tree hash: b7c9024540bb807ff762bbe6fbc3010c4773df72
|
@akankshapanse I see that @gnufied has answered your question. It is due to the race between kubelet and external-resizer. |
/cherry-pick release-1.29 |
We do not need a CP for 1.27, right? |
…055-upstream-release-1.29 Automated cherry pick of #123055: Fix race condition between external-resizer and kubelet
…055-upstream-release-1.28 Automated cherry pick of #123055: Fix race condition between external-resizer and kubelet
This fixes the race condition that could happen because resize controller just finished volume expansion and has only finished marking PV and yet to mark PVC.
The workaround proposed here should not be necessary once RecoverVolumeExpansionFailure goes GA/beta.
#117871