forked from TrueCloudLab/frostfs-node
[#1607] neofs-node: Initialize storage before other services
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
a4adb79db7
commit
2334e94fdb
1 changed files with 5 additions and 5 deletions
|
@ -70,6 +70,11 @@ func initAndLog(c *cfg, name string, initializer func(*cfg)) {
|
||||||
func initApp(c *cfg) {
|
func initApp(c *cfg) {
|
||||||
c.ctx, c.ctxCancel = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
|
c.ctx, c.ctxCancel = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
|
||||||
|
|
||||||
|
initAndLog(c, "storage engine", func(c *cfg) {
|
||||||
|
fatalOnErr(c.cfgObject.cfgLocalStorage.localStorage.Open())
|
||||||
|
fatalOnErr(c.cfgObject.cfgLocalStorage.localStorage.Init())
|
||||||
|
})
|
||||||
|
|
||||||
initAndLog(c, "gRPC", initGRPC)
|
initAndLog(c, "gRPC", initGRPC)
|
||||||
initAndLog(c, "netmap", initNetmapService)
|
initAndLog(c, "netmap", initNetmapService)
|
||||||
initAndLog(c, "accounting", initAccountingService)
|
initAndLog(c, "accounting", initAccountingService)
|
||||||
|
@ -83,11 +88,6 @@ func initApp(c *cfg) {
|
||||||
initAndLog(c, "tree", initTreeService)
|
initAndLog(c, "tree", initTreeService)
|
||||||
initAndLog(c, "control", initControlService)
|
initAndLog(c, "control", initControlService)
|
||||||
|
|
||||||
initAndLog(c, "storage engine", func(c *cfg) {
|
|
||||||
fatalOnErr(c.cfgObject.cfgLocalStorage.localStorage.Open())
|
|
||||||
fatalOnErr(c.cfgObject.cfgLocalStorage.localStorage.Init())
|
|
||||||
})
|
|
||||||
|
|
||||||
initAndLog(c, "morph notifications", listenMorphNotifications)
|
initAndLog(c, "morph notifications", listenMorphNotifications)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue