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

CSI: move terminal alloc handling into denormalization #11931

Merged
merged 4 commits into from
Jan 27, 2022
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Jan 25, 2022

This draft PR has been split off from #11890 and #11932 to make the core idea of those PRs more understandable.

The core GC job and volumewatcher will have logic that largely duplicates logic in the state store's CSIVolumeDenormalize method. The only missing part is the handling of terminal allocations, so this changeset moves that logic into the CSIVolumeDenormalize method so it exists in only one place. Best reviewed commit-by-commit.

@tgross
Copy link
Member Author

tgross commented Jan 26, 2022

I've tagged reviewers on this but it currently includes all the code in #11890 and #11932 so y'all may want to wait till those are merged to review this one.

The volume claim GC method and volumewatcher both have logic
collecting terminal allocations that duplicates most of the logic
that's now in the state store's `CSIVolumeDenormalize` method. Copy
this logic into the state store so that all code paths have the same
view of the past claims.

(1/4 refactoring commits)
Remove logic in the volume claim GC that now lives in the state
store's `CSIVolumeDenormalize` method.

(2/4 refactoring commits)
Remove logic in the volumewatcher that now lives in the state
store's `CSIVolumeDenormalize` method.

(3/4 refactoring commits)
Remove logic in the node unpublish RPC that now lives in the state
store's `CSIVolumeDenormalize` method.

(4/4 refactoring commits)
Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tgross tgross merged commit 2e35716 into main Jan 27, 2022
@tgross tgross deleted the csi-refactoring-pr branch January 27, 2022 15:39
tgross added a commit that referenced this pull request Jan 28, 2022
* The volume claim GC method and volumewatcher both have logic
collecting terminal allocations that duplicates most of the logic
that's now in the state store's `CSIVolumeDenormalize` method. Copy
this logic into the state store so that all code paths have the same
view of the past claims.
* Remove logic in the volume claim GC that now lives in the state
store's `CSIVolumeDenormalize` method.
* Remove logic in the volumewatcher that now lives in the state
store's `CSIVolumeDenormalize` method.
* Remove logic in the node unpublish RPC that now lives in the state
store's `CSIVolumeDenormalize` method.
tgross added a commit that referenced this pull request Jan 28, 2022
* The volume claim GC method and volumewatcher both have logic
collecting terminal allocations that duplicates most of the logic
that's now in the state store's `CSIVolumeDenormalize` method. Copy
this logic into the state store so that all code paths have the same
view of the past claims.
* Remove logic in the volume claim GC that now lives in the state
store's `CSIVolumeDenormalize` method.
* Remove logic in the volumewatcher that now lives in the state
store's `CSIVolumeDenormalize` method.
* Remove logic in the node unpublish RPC that now lives in the state
store's `CSIVolumeDenormalize` method.
@tgross
Copy link
Member Author

tgross commented Jan 28, 2022

Removed the backport/1.0 tag on this one because this refactoring relies entirely on #11932, which was also removed.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants