mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
Add Veeam storage class override (#19748)
Recent Veeam is very picky about storage class names. Add `_MINIO_VEEAM_FORCE_SC` env var. It will override the storage class returned by the storage backend if it is non-standard and we detect a Veeam client by checking the User Agent. Applies to HeadObject/GetObject/ListObject*
This commit is contained in:
@@ -47,6 +47,7 @@ import (
|
||||
"github.com/minio/minio/internal/config"
|
||||
"github.com/minio/minio/internal/config/api"
|
||||
xtls "github.com/minio/minio/internal/config/identity/tls"
|
||||
"github.com/minio/minio/internal/config/storageclass"
|
||||
"github.com/minio/minio/internal/fips"
|
||||
"github.com/minio/minio/internal/handlers"
|
||||
"github.com/minio/minio/internal/hash"
|
||||
@@ -1142,3 +1143,11 @@ type itemOrErr[V any] struct {
|
||||
Item V
|
||||
Err error
|
||||
}
|
||||
|
||||
func filterStorageClass(ctx context.Context, s string) string {
|
||||
// Veeam 14.0 and later clients are not compatible with custom storage classes.
|
||||
if globalVeeamForceSC != "" && s != storageclass.STANDARD && s != storageclass.RRS && isVeeamClient(ctx) {
|
||||
return globalVeeamForceSC
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user