forked from TrueCloudLab/frostfs-node
[#1680] node: Return MAINTENANCE
status in corresponding mode
Make storage node to return `NODE_UNDER_MAINTENANCE` status error on each local object operation if the node is in `MAINTENANCE` mode. Pass `apistatus.NodeUnderMaintenance` to `StorageEngine.BlockExecution` during `ControlService.SetNetmapStatus` RPC processing. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9fcc80ea38
commit
d6c01199c8
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
netmapTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/netmap/grpc"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
netmapService "github.com/nspcc-dev/neofs-node/pkg/services/netmap"
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/version"
|
||||
|
@ -318,7 +319,7 @@ func addNewEpochAsyncNotificationHandler(c *cfg, h event.Handler) {
|
|||
|
||||
var errRelayBootstrap = errors.New("setting netmap status is forbidden in relay mode")
|
||||
|
||||
var errNodeMaintenance = errors.New("node is in maintenance mode")
|
||||
var errNodeMaintenance apistatus.NodeUnderMaintenance
|
||||
|
||||
func (c *cfg) SetNetmapStatus(st control.NetmapStatus) error {
|
||||
switch st {
|
||||
|
|
Loading…
Reference in a new issue