Backport of CSI: allow plugin GC to detect jobs with updated plugin IDs into release/1.7.x #20613
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #20555 to be assessed for backporting due to the inclusion of the label backport/1.7.x.
The below text is copied from the body of the original PR.
When a job that implements a plugin is updated to have a new plugin ID, the old version of the plugin is never deleted. We want to delay deleting plugins until garbage collection to avoid race conditions between a plugin being registered and its allocations being marked healthy.
Add logic to the state store's
DeleteCSIPlugin
method (used only by GC) to check whether any of the jobs associated with the plugin have no allocations and either have been purged or have been updated to no longer implement that plugin ID.This changeset also updates the CSI plugin lifecycle tests in the state store to use
shoenig/test
overtestify
, and removes a spurious error log that was happening on every periodic plugin GC attempt.Fixes: #20225
Overview of commits