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

Actively used VolumeSnapshots being deleted due to retention violation #667

Open
Chase-Marino opened this issue Jun 11, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Chase-Marino
Copy link

Describe the bug
When restoring to a VolumeSnapshot created by SnapshotScheduler which has retention defined, you are subject to your VolumeSnapshot being deleted. This results in the PVC having a dangling reference.

Steps to reproduce

  1. Create a snapshot schedule with retention time/count defined.
  2. Create PVC referencing VolumeSnapshot created by schedule
  3. Wait for retention cycle
  4. Observe the actively used VolumeSnapshot is deleted

Expected behavior
VolumeSnapshot should be protected/excluded from retention once it has been referenced.

Actual results
VolumeSnapshot is deleted

Additional context
Current workaround is to delete snapscheduler.backube/when, snapscheduler.backube/schedule labels.

Solution ideas are for operator to detect when it was mounted and permanently exclude that Snapshot, or for a snapscheduler.backube/retention="keep" label to exclude a Snapshot from retention cleanup

@Chase-Marino Chase-Marino added the bug Something isn't working label Jun 11, 2024
@Chase-Marino
Copy link
Author

@JohnStrunk Thoughts?

@JohnStrunk
Copy link
Member

I'm a bit confused about what you believe the problem to be with the current behavior.

When the snapshot name is used in the dataSource field for a PVC, it serves to set the initial contents of the PVC, but once that PVC has been provisioned, the value of the field is meaningless. Why do you believe the associated snapshot should be retained?

BTW, removing snapscheduler.backube/schedule is the correct approach if you want to retain the snapshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants