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

unable to delete velero restore objects from the cloud storage #2697

Closed
sawansharma005 opened this issue Jul 8, 2020 · 8 comments · Fixed by #6479
Closed

unable to delete velero restore objects from the cloud storage #2697

sawansharma005 opened this issue Jul 8, 2020 · 8 comments · Fixed by #6479
Assignees
Milestone

Comments

@sawansharma005
Copy link

What steps did you take and what happened:
[A clear and concise description of what the bug is, and what commands you ran.)

I was trying to delete the restore objects using the below command but it is not deleting the restore objects from cloud storage.

velero restore delete ${restore_name}

What did you expect to happen:
It should delete the restore from velero as well as from the cloud storage

The output of the following commands will help us better understand what's going on:
(Pasting long output into a GitHub gist or other pastebin is fine.)

Server Side logs

root@testvm:~# velero restore get
NAME                        BACKUP                        STATUS      WARNINGS   ERRORS   CREATED                         SELECTOR
wordpress-mysql-service     velero-daily-20200708054623   Completed   6          0        2020-07-08 05:48:20 +0000 UTC   <none>
wordpress-service-restore   velero-daily-20200708054623   Completed   6          0        2020-07-08 05:49:48 +0000 UTC   <none>
root@testvm:~# velero restore delete --all
Are you sure you want to continue (Y/N)? Y
Restore "wordpress-mysql-service" deleted
Restore "wordpress-service-restore" deleted
root@testvm:~# velero restore get
root@testvm:~#

Cloud side restore components are not deleting

github

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Velero version (use velero version): 1.4.0
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): ubuntu

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@carlisia carlisia added the Needs Testing If you've tested your change but would still like a maintainer to try it in a different environment label Jul 18, 2020
@carlisia
Copy link
Contributor

This needs testing to see if it's a bug.

@ashish-amarnath
Copy link
Member

ashish-amarnath commented Jul 28, 2020

A quick look at the code for this.
https://github.com/vmware-tanzu/velero/blob/main/pkg/cmd/cli/restore/delete.go#L108-L115
Also, restore_controller does not reconcile the restore object deletion.

We don't delete the restore data from the backup storage location. The only time we delete restores from the BSL is when the associated backup is deleted.
Not deleting the restore from the BSL on velero restore delete maybe by design and not a bug.

I think we can make a case to add a flag that will delete the restore from the BSL.

Going to let other @vmware-tanzu/velero-maintainers chime in on this.

@ashish-amarnath
Copy link
Member

ashish-amarnath commented Jul 28, 2020

I think I am going to recant myself and call a bug.
Scenario:

  1. Create a backup b1
  2. Restore from b1 as r1
  3. Restore from b1 as r2
  4. velero restore delete r1 will delete the kubernetes object, and not the restore in the BSL.
  5. Now, velero delete backup b1 --confirm will only discover r2 as the restore corresponding to b1 and therefore will delete only r2 from the BSL. This will leak r1 in the BSL that will have to be manually deleted.

Ran this on a cluster to confirm the behavior described in this issue.

Thank you @sawansharma005 for reporting this.

@stale
Copy link

stale bot commented Nov 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the staled label Nov 14, 2021
@farcaller
Copy link

not stale.

@stale stale bot removed the staled label Nov 14, 2021
@stale
Copy link

stale bot commented Jan 14, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the staled label Jan 14, 2022
@farcaller
Copy link

not stale

@reasonerjt
Copy link
Contributor

Restore CRs are less sensitive than Backup CRs so we may not want to implement "RestoreDeletionController"

One option can be leveraging the finalizer mechanism to we can read the spec of the restore and handle to clean up work in the restore controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants