Skip to content

Commit

Permalink
Add snapshot retention folder fix
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
  • Loading branch information
vitorsavian committed Jun 5, 2024
1 parent 79ba10f commit 987b84d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/etcd/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@ func (s *S3) snapshotRetention(ctx context.Context) ([]string, error) {
deleted := []string{}
for _, df := range snapshotFiles[s.config.EtcdSnapshotRetention:] {
logrus.Infof("Removing S3 snapshot: s3://%s/%s", s.config.EtcdS3BucketName, df.Key)
if err := s.deleteSnapshot(ctx, df.Key); err != nil {

key := path.Base(df.Key)
if err := s.deleteSnapshot(ctx, key); err != nil {
return deleted, err
}
deleted = append(deleted, df.Key)
Expand Down

0 comments on commit 987b84d

Please sign in to comment.