mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
Config migration should handle plain-text (#8506)
This PR fixes issues found in config migration - StorageClass migration error when rrs is empty - Plain-text migration of older config - Do not run in safe mode with incorrect credentials - Update logger_http documentation for _STATE env Refer more reported issues at #8434
This commit is contained in:
committed by
kannappanr
parent
4082764d48
commit
aa04f97f95
@@ -200,6 +200,10 @@ func newAllSubsystems() {
|
||||
func initSafeModeInit(buckets []BucketInfo) (err error) {
|
||||
defer func() {
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case config.Err:
|
||||
return
|
||||
}
|
||||
// Enable logger
|
||||
logger.Disable = false
|
||||
|
||||
@@ -246,25 +250,25 @@ func initSafeModeInit(buckets []BucketInfo) (err error) {
|
||||
func initAllSubsystems(buckets []BucketInfo, newObject ObjectLayer) (err error) {
|
||||
// Initialize config system.
|
||||
if err = globalConfigSys.Init(newObject); err != nil {
|
||||
return fmt.Errorf("Unable to initialize config system: %v", err)
|
||||
return fmt.Errorf("Unable to initialize config system: %w", err)
|
||||
}
|
||||
|
||||
if err = globalNotificationSys.AddNotificationTargetsFromConfig(globalServerConfig); err != nil {
|
||||
return fmt.Errorf("Unable to initialize notification target(s) from config: %v", err)
|
||||
return fmt.Errorf("Unable to initialize notification target(s) from config: %w", err)
|
||||
}
|
||||
|
||||
if err = globalIAMSys.Init(newObject); err != nil {
|
||||
return fmt.Errorf("Unable to initialize IAM system: %v", err)
|
||||
return fmt.Errorf("Unable to initialize IAM system: %w", err)
|
||||
}
|
||||
|
||||
// Initialize notification system.
|
||||
if err = globalNotificationSys.Init(buckets, newObject); err != nil {
|
||||
return fmt.Errorf("Unable to initialize notification system: %v", err)
|
||||
return fmt.Errorf("Unable to initialize notification system: %w", err)
|
||||
}
|
||||
|
||||
// Initialize policy system.
|
||||
if err = globalPolicySys.Init(buckets, newObject); err != nil {
|
||||
return fmt.Errorf("Unable to initialize policy system; %v", err)
|
||||
return fmt.Errorf("Unable to initialize policy system; %w", err)
|
||||
}
|
||||
|
||||
// Initialize lifecycle system.
|
||||
|
||||
Reference in New Issue
Block a user