mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Bring in safe mode support (#8478)
This PR refactors object layer handling such that upon failure in sub-system initialization server reaches a stage of safe-mode operation wherein only certain API operations are enabled and available. This allows for fixing many scenarios such as - incorrect configuration in vault, etcd, notification targets - missing files, incomplete config migrations unable to read encrypted content etc - any other issues related to notification, policies, lifecycle etc
This commit is contained in:
committed by
kannappanr
parent
1c90a6bd49
commit
822eb5ddc7
@@ -370,11 +370,7 @@ func UnstartedTestServer(t TestErrHandler, instanceType string) TestServer {
|
||||
globalPolicySys = NewPolicySys()
|
||||
globalPolicySys.Init(buckets, objLayer)
|
||||
|
||||
globalNotificationSys, err = NewNotificationSys(globalServerConfig, testServer.Disks)
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to initialize notification system %s", err)
|
||||
}
|
||||
|
||||
globalNotificationSys = NewNotificationSys(testServer.Disks)
|
||||
globalNotificationSys.Init(buckets, objLayer)
|
||||
|
||||
globalLifecycleSys = NewLifecycleSys()
|
||||
@@ -1640,10 +1636,10 @@ func newTestObjectLayer(endpoints EndpointList) (newObject ObjectLayer, err erro
|
||||
globalIAMSys.Init(xl)
|
||||
|
||||
globalPolicySys = NewPolicySys()
|
||||
globalNotificationSys, err = NewNotificationSys(globalServerConfig, endpoints)
|
||||
if err != nil {
|
||||
return xl, err
|
||||
}
|
||||
globalPolicySys.Init(nil, xl)
|
||||
|
||||
globalNotificationSys = NewNotificationSys(endpoints)
|
||||
globalNotificationSys.Init(nil, xl)
|
||||
|
||||
return xl, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user