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 be1700f595
master
poornas 6 years ago committed by kannappanr
parent a1a426e523
commit 5f69f04909
  1. 7
      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()

Loading…
Cancel
Save