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

implement deletion of local snapshots for S3 backups #202

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

WanzenBug
Copy link
Member

When creating a remote backup in LINSTOR, we can remove the local snapshot after shipping completes.

@WanzenBug WanzenBug requested a review from rck June 15, 2023 10:23
@@ -967,6 +976,14 @@ func (d Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotReque
return nil, status.Errorf(codes.Internal, "failed to create snapshot: %v", err)
}

if snap.ReadyToUse && params.Type != volume.SnapshotTypeInCluster && params.DeleteLocal {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole block is basically a copy from above. please make that a function; at least the check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, moved to a function and cleaned it up a bit.

@WanzenBug WanzenBug force-pushed the delete-local-snapshots branch 2 times, most recently from 60f3698 to 4671200 Compare June 15, 2023 11:16
When creating a remote backup in LINSTOR, we can remove the local snapshot
after shipping completes.

Signed-off-by: Moritz "WanzenBug" Wanzenböck <[email protected]>
Copy link
Member

@rck rck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rck rck merged commit 3cad40d into master Jun 15, 2023
5 checks passed
@rck rck deleted the delete-local-snapshots branch June 15, 2023 12:17
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