diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index 950569f5c..90541318e 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -100,8 +100,6 @@ const ( cfgReBootstrapEnabled = "bootstrap.periodic.enabled" cfgReBootstrapInterval = "bootstrap.periodic.interval" - cfgShutdownOfflineEnabled = "shutdown.offline.enabled" - cfgObjectPutPoolSize = "pool.object.put.size" cfgObjectGetPoolSize = "pool.object.get.size" cfgObjectHeadPoolSize = "pool.object.head.size" @@ -253,8 +251,6 @@ type cfgNetmap struct { reBootstrapEnabled bool reBoostrapTurnedOff *atomic.Bool // managed by control service in runtime reBootstrapInterval uint64 // in epochs - - goOfflineEnabled bool // send `UpdateState(offline)` tx at shutdown } type BootstrapType uint32 @@ -384,7 +380,6 @@ func initCfg(path string) *cfg { reBootstrapInterval: viperCfg.GetUint64(cfgReBootstrapInterval), reBootstrapEnabled: !relayOnly && viperCfg.GetBool(cfgReBootstrapEnabled), reBoostrapTurnedOff: atomic.NewBool(relayOnly), - goOfflineEnabled: viperCfg.GetBool(cfgShutdownOfflineEnabled), }, cfgNodeInfo: cfgNodeInfo{ bootType: StorageNode, diff --git a/cmd/neofs-node/main.go b/cmd/neofs-node/main.go index a277d2e8d..50350b1a4 100644 --- a/cmd/neofs-node/main.go +++ b/cmd/neofs-node/main.go @@ -89,10 +89,6 @@ func shutdown(c *cfg) { closer() } - if c.cfgNetmap.goOfflineEnabled { - goOffline(c) - } - c.wg.Wait() } diff --git a/cmd/neofs-node/netmap.go b/cmd/neofs-node/netmap.go index 26d17d413..ea803ac26 100644 --- a/cmd/neofs-node/netmap.go +++ b/cmd/neofs-node/netmap.go @@ -189,21 +189,6 @@ func addNewEpochAsyncNotificationHandler(c *cfg, h event.Handler) { ) } -func goOffline(c *cfg) { - err := c.cfgNetmap.wrapper.UpdatePeerState( - crypto.MarshalPublicKey(&c.key.PublicKey), - netmapSDK.NodeStateOffline, - ) - - if err != nil { - c.log.Error("could not go offline", - zap.String("error", err.Error()), - ) - } else { - c.log.Info("request to go offline successfully sent") - } -} - func (c *cfg) SetNetmapStatus(st control.NetmapStatus) error { if st == control.NetmapStatus_ONLINE { c.cfgNetmap.reBoostrapTurnedOff.Store(false)