forked from TrueCloudLab/frostfs-node
[#761] cmd/node: Do not perform bootstrap procedure in relay mode
Storage node should not try to register itself in network in relay mode. Implement `needBootstrap` method which checks if node need to bootstrap. Call `bootstrap` method in `bootstrapNode` function only on true return. Skip re-bootstrap logic in new epoch event handler on false return. Return an error if `ControlService.SetNetmapStatus` is called on relay node. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
05d5b724a9
commit
7a5729ea2b
2 changed files with 17 additions and 3 deletions
|
@ -443,3 +443,8 @@ func (c *cfg) bootstrap() error {
|
|||
|
||||
return c.cfgNetmap.wrapper.AddPeer(&ni)
|
||||
}
|
||||
|
||||
// needBootstrap checks if local node should be registered in network on bootup.
|
||||
func (c *cfg) needBootstrap() bool {
|
||||
return c.cfgNetmap.needBootstrap
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue