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

Remove VolumeSnapshot created during backup #4858

Conversation

blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented Apr 26, 2022

Signed-off-by: Xun Jiang jxun@vmware.com

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #4761

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@blackpiglet blackpiglet self-assigned this Apr 26, 2022
@blackpiglet blackpiglet force-pushed the 4761-remove-volumesnapshot-after-backup branch from e5d2ea9 to 63c66a6 Compare April 26, 2022 02:49
@blackpiglet blackpiglet requested review from reasonerjt and ywk253100 and removed request for dsu-igeek April 26, 2022 03:07
@reasonerjt
Copy link
Contributor

It doesn't seem correct to me:

  1. The flow should be the same regardless of the deletion policy of vsclass.
  2. We should make sure that they don't exist on the source cluster after the backup is taken, rather than remove them from the backup store, (the restore flow may not need it but that's another story)

@blackpiglet blackpiglet changed the title Remove VolumeSnapshot created during backup, when the VolumeSnapshotC… Remove VolumeSnapshot created during backup Apr 26, 2022
@blackpiglet blackpiglet force-pushed the 4761-remove-volumesnapshot-after-backup branch from 63c66a6 to 001540b Compare April 29, 2022 11:37
pkg/util/csi/reset.go Outdated Show resolved Hide resolved
changelogs/unreleased/4858-jxun Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Show resolved Hide resolved
@blackpiglet blackpiglet force-pushed the 4761-remove-volumesnapshot-after-backup branch 6 times, most recently from 7688b9c to f841d2b Compare May 5, 2022 07:54
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Outdated Show resolved Hide resolved
pkg/controller/backup_controller.go Show resolved Hide resolved
@blackpiglet blackpiglet force-pushed the 4761-remove-volumesnapshot-after-backup branch from f841d2b to cd9a43d Compare May 5, 2022 09:26
…lass's DeletionPolicy is set to Delete.

1. Delete VolumeSnapshot directly when DeletionPolicy set to Retain.
2. Change VolumeSnapshotContent's DeletionPolicy to Retain, then delete VolumeSnapshot. After that delete VolumeSnapshotContent and change VSC DeletionPolicy to Delete back, then re-create the VolumeSnapshotContent.

Signed-off-by: Xun Jiang <jxun@vmware.com>
@blackpiglet blackpiglet force-pushed the 4761-remove-volumesnapshot-after-backup branch from cd9a43d to a69bd8b Compare May 5, 2022 10:38
@reasonerjt reasonerjt merged commit d6d9a0e into vmware-tanzu:main May 6, 2022
@blackpiglet blackpiglet deleted the 4761-remove-volumesnapshot-after-backup branch October 15, 2022 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid leaving additional resources after taking csi snapshot
3 participants