Skip to content

agent/csi,manager/csi: roll back client initialization on failure - #3254

Open
thaJeztah wants to merge 1 commit into
moby:masterfrom
thaJeztah:csi_rollback
Open

agent/csi,manager/csi: roll back client initialization on failure#3254
thaJeztah wants to merge 1 commit into
moby:masterfrom
thaJeztah:csi_rollback

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

The CSI plugins publish their gRPC clients before initialization completes because init() uses the client accessors during capability discovery. If initialization fails, the plugin is left partially initialized and subsequent calls reuse stale clients instead of retrying initialization.

Close the gRPC connection and reset the published clients when init() fails so the plugin returns to its pre-connect state and a later attempt can retry cleanly.

- What I did

- How I did it

- How to test it

- Description for the changelog

The CSI plugins publish their gRPC clients before initialization completes
because init() uses the client accessors during capability discovery. If
initialization fails, the plugin is left partially initialized and subsequent
calls reuse stale clients instead of retrying initialization.

Close the gRPC connection and reset the published clients when init() fails so
the plugin returns to its pre-connect state and a later attempt can retry
cleanly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.75%. Comparing base (6e9e7b8) to head (1d2f9f5).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3254      +/-   ##
==========================================
+ Coverage   14.73%   14.75%   +0.01%     
==========================================
  Files         200      200              
  Lines       93077    93102      +25     
==========================================
+ Hits        13712    13733      +21     
- Misses      78019    78035      +16     
+ Partials     1346     1334      -12     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants