From 6bd9057bb1469a2016cd2a3c23c887f258559272 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 3 Nov 2020 08:45:07 -0800 Subject: [PATCH] initialize IAM after etcd has initialized --- 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 e3cecbeea..e60f2ef22 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -199,9 +199,6 @@ func initServer(ctx context.Context, newObject ObjectLayer) error { globalObjectAPI = newObject globalObjLayerMutex.Unlock() - // Initialize IAM store - globalIAMSys.InitStore(newObject) - // Create cancel context to control 'newRetryTimer' go routine. retryCtx, cancel := context.WithCancel(ctx) @@ -338,6 +335,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.