-
Notifications
You must be signed in to change notification settings - Fork 143
modify: support rollback #513
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
base: master
Are you sure you want to change the base?
Conversation
`defer ctx.Done()` does not actually cancel the context.
So it will be clear which VAC the status is describing. Specifically, we now set target for Pending status to indicate which VAC we are waiting for.
Also fix the test. Previous test does not actually cover the relevant code path.
fix wrong error is used when checking final error. map is not safe work read/write concurrently from multiple worker. Also fixed that. Added related tests.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huww98 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @huww98. Thanks for your PR. I'm waiting for a kubernetes-csi 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-sigs/prow repository. |
Support rollback to VAC A if modifying from A to B failed with a final error. This works just like we modifying it again to C on final error. The significant changes in the sync logic: - Always retry if pvc.Status.ModifyVolumeStatus is not nil, which means the last transation does not finish successfully. - Treat empty VAC name like refering to an special VAC with empty parameters, to support the use case of rolling back from non-nil VAC name to nil. We only allow this when no modify has been successfully applied, to avoid by-passing the quota system.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Support rollback to VAC A if modifying from A to B failed with a final error.
This works just like we modifying it again to C on final error.
The significant changes in the sync logic:
last transation does not finish successfully.
to support the use case of rolling back from non-nil VAC name to nil. We only
allow this when no modify has been successfully applied, to avoid by-passing
the quota system.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
The first 4 commits are already included in my other PRs. Please review the last commit. I will rebase when the previous PRs are merged.
Does this PR introduce a user-facing change?: