fix: evict unhealthy provider clients on failed health checks - #2056
fix: evict unhealthy provider clients on failed health checks#2056dlanov wants to merge 1 commit into
Conversation
Signed-off-by: Dennis Lanov <dennis.lanov@gmail.com>
|
This issue is currently awaiting triage. If secrets-store-csi-driver contributors determine this is a relevant issue, they will accept it by applying the The DetailsInstructions 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. |
|
Welcome @dlanov! |
|
Hi @dlanov. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dlanov The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
/kind bug
What this PR does / why we need it:
Provider gRPC clients are cached after their socket path is discovered. If a provider later moves its socket, the cached client can continue pointing to the old socket and remain unusable until the CSI driver is restarted.
This change:
Get()call to rescan the configured socket paths and create a new client;The default value of
providerHealthCheckremainsfalse.Which issue(s) this PR fixes:
Fixes #1821
Testing:
go test ./pkg/secrets-store -run 'TestPluginClientBuilder_HealthCheck' -count=20go test -race ./pkg/secrets-store -run 'TestPluginClientBuilder_HealthCheck' -count=5make lintmake testmake lint-chartsSpecial notes for your reviewer:
The new eviction helper compares the cached connection against the connection captured by the failed health check. This avoids deleting a replacement client if another goroutine recreated the provider connection while the health-check RPC was running.
TODOs: