forked from TrueCloudLab/frostfs-node
[#1922] neofs-node: Allow to go online after maintenance
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
1980ed968a
commit
0d14ef69f0
3 changed files with 8 additions and 5 deletions
|
@ -848,11 +848,13 @@ func (c *cfg) handleLocalNodeInfo(ni *netmap.NodeInfo) {
|
|||
}
|
||||
|
||||
// bootstrap sets local node's netmap status to "online".
|
||||
func (c *cfg) bootstrap() error {
|
||||
// If current netmap status is MAINTENANCE and this function wasn't called thorough a control service,
|
||||
// the status is untouched.
|
||||
func (c *cfg) bootstrap(manual bool) error {
|
||||
ni := c.cfgNodeInfo.localInfo
|
||||
|
||||
// switch to online except when under maintenance
|
||||
if st := c.cfgNetmap.state.controlNetmapStatus(); st == control.NetmapStatus_MAINTENANCE {
|
||||
if st := c.cfgNetmap.state.controlNetmapStatus(); st == control.NetmapStatus_MAINTENANCE && !manual {
|
||||
ni.SetMaintenance()
|
||||
|
||||
c.log.Info("bootstrap with untouched node state",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue