mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
control: Fix controller CLI handling with distributed server object layer.
Object layer initialization is done lazily fix it.
This commit is contained in:
@@ -106,16 +106,23 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
|
||||
ObjectAPI: newObjectLayerFn,
|
||||
}
|
||||
|
||||
// Initialize Controller.
|
||||
ctrlHandlers := &controllerAPIHandlers{
|
||||
ObjectAPI: newObjectLayerFn,
|
||||
}
|
||||
|
||||
// Initialize router.
|
||||
mux := router.NewRouter()
|
||||
|
||||
// Register all routers.
|
||||
registerStorageRPCRouters(mux, storageRPCs)
|
||||
|
||||
// Initialize distributed NS lock.
|
||||
initDistributedNSLock(mux, srvCmdConfig)
|
||||
|
||||
// FIXME: till net/rpc auth is brought in "minio control" can be enabled only though
|
||||
// this env variable.
|
||||
if os.Getenv("MINIO_CONTROL") != "" {
|
||||
if !strings.EqualFold(os.Getenv("MINIO_CONTROL"), "off") {
|
||||
registerControlRPCRouter(mux, ctrlHandlers)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user