From 2334e94fdb42b62cf9f13b6bffca0668dca251b5 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 29 Jun 2022 18:33:02 +0300 Subject: [PATCH] [#1607] neofs-node: Initialize storage before other services Signed-off-by: Evgenii Stratonikov --- cmd/neofs-node/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/neofs-node/main.go b/cmd/neofs-node/main.go index 81e9e052..92a2f4c1 100644 --- a/cmd/neofs-node/main.go +++ b/cmd/neofs-node/main.go @@ -70,6 +70,11 @@ func initAndLog(c *cfg, name string, initializer func(*cfg)) { func initApp(c *cfg) { 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, "netmap", initNetmapService) initAndLog(c, "accounting", initAccountingService) @@ -83,11 +88,6 @@ func initApp(c *cfg) { initAndLog(c, "tree", initTreeService) 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) }