From 8c76e1353e827ac0267a83529fdd00a9d79ffd16 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 3 Nov 2020 12:12:30 -0800 Subject: [PATCH] initialize IAM after etcd has initialized (#10819) --- cmd/server-main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/server-main.go b/cmd/server-main.go index d2acc6ae8..7fb6654d0 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -206,9 +206,6 @@ func initServer(ctx context.Context, newObject ObjectLayer) error { globalObjectAPI = newObject globalObjLayerMutex.Unlock() - // Initialize IAM store - globalIAMSys.InitStore(newObject) - // Make sure to hold lock for entire migration to avoid // such that only one server should migrate the entire config // at a given time, this big transaction lock ensures this @@ -342,6 +339,9 @@ 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)) } + // Initialize IAM store + globalIAMSys.InitStore(newObject) + // Populate existing buckets to the etcd backend if globalDNSConfig != nil { // Background this operation.