portworx / velero-plugin

Portworx plugin for Velero
Apache License 2.0
7 stars 7 forks source link

Cloud snapshot in S3 not removed after backup removed #13

Open TLmaK0 opened 2 years ago

TLmaK0 commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

What happened: The snapshot stored in s3 is not deleted after delete the associated backup.

What you expected to happen: The snapshot stored in s3 should be deleted

How to reproduce it (as minimally and precisely as possible): create a S3 credentials in portwoxs:

pxctl credentials create \                                                                                                                                                                                         
  --provider s3 \                                                                                                                                                                                                  
  --s3-access-key <YOUR-SECRET-ACCESS-KEY> \                                                                                                                                                                       
  --s3-secret-key <YOUR-ACCESS-KEY-ID> \                                                                                                                                                                           
  --s3-region eu-central-1 \                                                                                                                                                                                       
  --s3-endpoint s3.amazonaws.com \                                                                                                                                                                                 
  s3-credentials

create a cloud volume snapshot location:

velero snapshot-location create portworx-cloud --provider portworx.io/portworx --config type=cloud

create a backup:

velero backup create test1 --volume-snapshot-locations portworx-cloud -l app=<service-with-volume>

check that the snapshot is create in the S3

delete backup:

velero backup delete test1

check that the snapshot has not been deleted in S3

Anything else we need to know?:

velero time="2022-03-04T08:49:27Z" level=info msg="Validating backup storage location" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage_location_control
ler.go:114"                                                                                                                                                                                                        
velero time="2022-03-04T08:49:28Z" level=info msg="Backup storage location valid, marking as available" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage
_location_controller.go:121"                                                                                                                                                                                       
velero time="2022-03-04T08:50:28Z" level=info msg="Validating backup storage location" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage_location_control
ler.go:114"                                                                                                                                                                                                        
velero time="2022-03-04T08:50:28Z" level=info msg="Backup storage location valid, marking as available" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage
_location_controller.go:121"                                                                                                                                                                                       
velero time="2022-03-04T08:51:05Z" level=info msg="Removing existing deletion requests for backup" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:455" name=test5-
kl95z namespace=velero                                                                                                                                                                                             
velero time="2022-03-04T08:51:05Z" level=info msg="Removing PV snapshots" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:331" name=test5-kl95z namespace=velero   
velero time="2022-03-04T08:51:05Z" level=info msg="Removing snapshot associated with backup" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:339" name=test5-kl95z 
namespace=velero providerSnapshotID=c3ad907d-39c2-4f90-81fb-6d6930fc9062/604460463293303479-1043065522391268178                                                                                                    
velero time="2022-03-04T08:51:05Z" level=info msg="Init'ing portworx plugin with config map[type:cloud]" backup=test5 cmd=/plugins/velero-blockstore-portworx controller=backup-deletion logSource="/go/src/github.
com/portworx/velero-plugin/pkg/snapshot/plugin.go:61" name=test5-kl95z namespace=velero pluginName=velero-blockstore-portworx                                                                                      
velero time="2022-03-04T08:51:05Z" level=info msg="Init'ing portworx cloud snapshot with credID " backup=test5 cmd=/plugins/velero-blockstore-portworx controller=backup-deletion logSource="/go/src/github.com/por
tworx/velero-plugin/pkg/snapshot/cloudsnap.go:24" name=test5-kl95z namespace=velero pluginName=velero-blockstore-portworx                                                                                          
velero time="2022-03-04T08:51:05Z" level=info msg="Removing restic snapshots" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:357" name=test5-kl95z namespace=veler
o                                                                                                                                                                                                                  
velero time="2022-03-04T08:51:05Z" level=info msg="Removing backup from backup storage" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:365" name=test5-kl95z names
pace=velero                                                                                                                                                                                                        
velero time="2022-03-04T08:51:05Z" level=info msg="Removing restores" backup=test5 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:371" name=test5-kl95z namespace=velero       
velero I0304 08:51:27.124817       1 request.go:665] Waited for 1.042307724s due to client-side throttling, not priority and fairness, request: GET:https://172.20.0.1:443/apis/autoscaling/v2beta2?timeout=32s    
velero time="2022-03-04T08:51:28Z" level=info msg="Validating backup storage location" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage_location_control
ler.go:114"                                                                                                                                                                                                        
velero time="2022-03-04T08:51:28Z" level=info msg="Backup storage location valid, marking as available" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage
_location_controller.go:121"                                                                                                                                                                                       
velero time="2022-03-04T08:52:28Z" level=info msg="Validating backup storage location" backup-storage-location=default controller=backup-storage-location logSource="pkg/controller/backup_storage_location_control
ler.go:114"                                                                                                                                                                                                        

Environment: