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

fix(csi-volume): fix volume leaks when user delete pvc but pv not created #1316

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

SSmallMonster
Copy link
Member

What this PR does / why we need it:

Special notes for your reviewer:

fix #1306

refer to https://github.com/container-storage-interface/spec/blob/master/spec.md#error-scheme, plugin should return the correct status to tell co what to do next when CreateVolume failed at first time. When Unavailable status code returnd, co will retry create volume and store this process at cache.

This also helps co to call DeleteVolume as expected when user delete pvc when pv not created
but backend volume has created.

Does this PR introduce a user-facing change?


@SSmallMonster SSmallMonster added kind/bug Categorizes issue or PR as related to a bug. kind/enhancement New feature or request labels Dec 12, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7726823) 28.41% compared to head (7ace549) 28.35%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1316      +/-   ##
==========================================
- Coverage   28.41%   28.35%   -0.07%     
==========================================
  Files          34       34              
  Lines        3079     3079              
==========================================
- Hits          875      873       -2     
- Misses       2089     2090       +1     
- Partials      115      116       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

refer to https://github.com/container-storage-interface/spec/blob/master/spec.md#error-scheme
plugin should return the correct status to tell co what to do next when CreateVolume
failed at first time. When Unavailable status code returnd, co will retry create volume
and store this process at cache.

This also helps co to call DeleteVolume as expected when user delete pvc when pv not created
but backend volume has created.

Signed-off-by: SSmallMonster <mingming.zhou@daocloud.io>
@SSmallMonster SSmallMonster merged commit 1f638d5 into hwameistor:main Dec 15, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/enhancement New feature or request
Projects
None yet
2 participants