| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
|
Skipping CI for Draft Pull Request. |
Sorry, something went wrong.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. Details Needs approval from an approver in each of these files:Approvers can indicate their approval by writing /approve in a comment |
Sorry, something went wrong.
| return nil, status.Error(codes.AlreadyExists, "Volume Already exists with same name and different capacity") | ||
| } | ||
| if *vols[0].Status != stackitclient.VolumeAvailableStatus { | ||
| return nil, status.Error(codes.Internal, fmt.Sprintf("Volume %s is not in available state", *vols[0].Id)) |
There was a problem hiding this comment.
I needs to be also handled here or?
Sorry, something went wrong.
There was a problem hiding this comment.
No, we can't. This would remove volumes that can potentially have data in it. Think about this scenario
1. User creates Volume with data unrelated to SKE or any CSI
2. Volume enters bad state due to reasons
3. User tries to import Volume (which is possible) back into Kubernetes
4. Volume is now managed by CSI and will be deleted because of 2.) instead of being stuck.
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think you can import a volume and land here in the CreateVolume request. The volume name contains the PVC name. Do you see any reason why this function gets called after a volume is created?
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah that was wrong, thats is the ControllerGetVolume RPC. disregard what I said there
Sorry, something went wrong.
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
| return nil, status.Error(codes.AlreadyExists, "Volume Already exists with same name and different capacity") | ||
| } | ||
| if *vols[0].Status != stackitclient.VolumeAvailableStatus { | ||
| return nil, status.Error(codes.Internal, fmt.Sprintf("Volume %s is not in available state", *vols[0].Id)) |
There was a problem hiding this comment.
I don't think you can import a volume and land here in the CreateVolume request. The volume name contains the PVC name. Do you see any reason why this function gets called after a volume is created?
Sorry, something went wrong.
| if cs.Driver.deleteVolumesInErrorState { | ||
| cs.deleteVolumeInError(ctx, vol) | ||
| } |
There was a problem hiding this comment.
We also could say we just error here and only delete on the other place above.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes that would be an option. I like it
Sorry, something went wrong.
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
| Back | FazBrowse Home | New Git URL |
How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
The idea is to automatically delete the volume when status is ERROR. We do this there is no left-over volumes even though the CreateVolume RPC failed.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Breaking changes: