mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
relax validation when loading lifecycle document from the backend (#9612)
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"path"
|
||||
"sync"
|
||||
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/bucket/lifecycle"
|
||||
)
|
||||
|
||||
@@ -148,9 +149,15 @@ func (sys *LifecycleSys) load(buckets []BucketInfo, objAPI ObjectLayer) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Do not load the lifecycle configuration if it is not valid
|
||||
err = config.Validate()
|
||||
if err != nil {
|
||||
logger.LogIf(context.Background(), err)
|
||||
continue
|
||||
}
|
||||
|
||||
sys.Set(bucket.Name, config)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user