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

support deletion of snapshots after restore from backup #212

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

WanzenBug
Copy link
Member

When a user requests a restore from an off-site backup, they might want the local snapshot to be deleted after the restore.

We already have this option when creating the snapshot by using a special parameter on the snapshot class. However, we do not have that information available directly.

To support this, we need to lookup the snapshot content and snapshot class ourselfes, then parse the parameters. This is all optional, as LINSTOR CSI still needs to work outside kubernetes, or inside Kubernetes with incomplete information.

@WanzenBug WanzenBug force-pushed the delete-snapshots-after-restore-if-backup branch from 6475bac to 845d65c Compare October 6, 2023 09:52
@WanzenBug WanzenBug requested a review from rck October 6, 2023 09:55
pkg/driver/driver.go Outdated Show resolved Hide resolved
When a user requests a restore from an off-site backup, they might want the
local snapshot to be deleted after the restore.

We already have this option when creating the snapshot by using a special
parameter on the snapshot class. However, we do not have that information
available directly.

To support this, we need to lookup the snapshot content and snapshot class
ourselfes, then parse the parameters. This is all optional, as LINSTOR CSI
still needs to work outside kubernetes, or inside Kubernetes with incomplete
information.

Signed-off-by: Moritz "WanzenBug" Wanzenböck <[email protected]>
@WanzenBug WanzenBug force-pushed the delete-snapshots-after-restore-if-backup branch from 845d65c to 40ea244 Compare October 6, 2023 10:44
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, feel free to merge

@WanzenBug WanzenBug merged commit 4ed2026 into master Oct 6, 2023
5 checks passed
@WanzenBug WanzenBug deleted the delete-snapshots-after-restore-if-backup branch October 6, 2023 11:04
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