mirror of
https://github.com/minio/minio.git
synced 2025-03-30 09:13:41 -04:00
initialize IAM store before Init() to avoid any crash (#11236)
This commit is contained in:
parent
6f781c5e7a
commit
a6dee21092
@ -444,6 +444,9 @@ func (sys *IAMSys) Initialized() bool {
|
|||||||
|
|
||||||
// Init - initializes config system by reading entries from config/iam
|
// Init - initializes config system by reading entries from config/iam
|
||||||
func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer) {
|
func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer) {
|
||||||
|
// Initialize IAM store
|
||||||
|
sys.InitStore(objAPI)
|
||||||
|
|
||||||
retryCtx, cancel := context.WithCancel(ctx)
|
retryCtx, cancel := context.WithCancel(ctx)
|
||||||
|
|
||||||
// Indicate to our routine to exit cleanly upon return.
|
// Indicate to our routine to exit cleanly upon return.
|
||||||
|
@ -356,9 +356,6 @@ func initAllSubsystems(ctx context.Context, newObject ObjectLayer) (err error) {
|
|||||||
logger.LogIf(ctx, fmt.Errorf("Unable to initialize config, some features may be missing %w", err))
|
logger.LogIf(ctx, fmt.Errorf("Unable to initialize config, some features may be missing %w", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize IAM store
|
|
||||||
globalIAMSys.InitStore(newObject)
|
|
||||||
|
|
||||||
// Populate existing buckets to the etcd backend
|
// Populate existing buckets to the etcd backend
|
||||||
if globalDNSConfig != nil {
|
if globalDNSConfig != nil {
|
||||||
// Background this operation.
|
// Background this operation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user