Skip to content

Commit

Permalink
NetApp ONTAP below 9.13.1 doesn't support PutBucketLifecycleConfigura…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
robertvolkmann committed Mar 13, 2024
1 parent c0320b7 commit f5dc9e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/internal/backup/providers/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"log/slog"
"net/http"
"path"
"path/filepath"
"strings"
Expand Down Expand Up @@ -146,6 +147,15 @@ func (b *BackupProviderS3) EnsureBackupBucket(ctx context.Context) error {
},
})
if err != nil {
var responseError interface {
HTTPStatusCode() int
}
if errors.As(err, &responseError) {
if responseError.HTTPStatusCode() == http.StatusNotImplemented {
b.log.Warn("backups cannot be automatically cleaned", err)
return nil
}
}
return err
}
return nil
Expand Down

0 comments on commit f5dc9e8

Please sign in to comment.