remove safeMode behavior in startup (#10645)

In almost all scenarios MinIO now is
mostly ready for all sub-systems
independently, safe-mode is not useful
anymore and do not serve its original
intended purpose.

allow server to be fully functional
even with config partially configured,
this is to cater for availability of actual
I/O v/s manually fixing the server.

In k8s like environments it will never make
sense to take pod into safe-mode state,
because there is no real access to perform
any remote operation on them.
This commit is contained in:
Harshavardhana
2020-10-09 09:59:52 -07:00
committed by GitHub
parent 1738eb24b1
commit a0d0645128
27 changed files with 139 additions and 268 deletions

View File

@@ -300,7 +300,6 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
// Once endpoints are finalized, initialize the new object api in safe mode.
globalObjLayerMutex.Lock()
globalSafeMode = true
globalObjectAPI = newObject
globalObjLayerMutex.Unlock()
@@ -325,7 +324,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
if enableIAMOps {
// Initialize IAM sys.
startBackgroundIAMLoad(GlobalContext)
startBackgroundIAMLoad(GlobalContext, newObject)
}
if globalCacheConfig.Enabled {
@@ -353,11 +352,6 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
// - compression
verifyObjectLayerFeatures("gateway "+gatewayName, newObject)
// Disable safe mode operation, after all initialization is over.
globalObjLayerMutex.Lock()
globalSafeMode = false
globalObjLayerMutex.Unlock()
// Prints the formatted startup message once object layer is initialized.
if !globalCLIContext.Quiet {
mode := globalMinioModeGatewayPrefix + gatewayName