From 5f69f04909843f8743b0a5b59dbed1abe56dc8b3 Mon Sep 17 00:00:00 2001 From: poornas Date: Fri, 3 Aug 2018 15:12:18 -0700 Subject: [PATCH] nas gateway: fix regression in global bucket policy initialization (#6243) Fixes #6238 globalPolicySys used to be initialized in fs/xl layer. The referenced commit moved this logic to server/gateway initialization,but a check to avoid double initialization prevented globalPolicySys to be loaded from disk for NAS. fixes regression from commit be1700f5950b5630ef3bfd81a0785f350559ebfe --- cmd/gateway-main.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/gateway-main.go b/cmd/gateway-main.go index 28e1c25f2..b74256731 100644 --- a/cmd/gateway-main.go +++ b/cmd/gateway-main.go @@ -217,12 +217,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) { logger.FatalIf(err, "Unable to initialize gateway backend") } - if gw.Name() != "nas" { - // Initialize policy sys for all gateways. NAS gateway already - // initializes policy sys internally, avoid double initialization. - // Additionally also don't block the initialization of gateway. - go globalPolicySys.Init(newObject) - } + go globalPolicySys.Init(newObject) // Once endpoints are finalized, initialize the new object api. globalObjLayerMutex.Lock()