Stay in maintenance mode unless other is requested manually #409
1 changed files with 8 additions and 0 deletions
|
@ -253,6 +253,10 @@ func readSubnetCfg(c *cfg) {
|
|||
// Must be called after initNetmapService.
|
||||
func bootstrapNode(c *cfg) {
|
||||
if c.needBootstrap() {
|
||||
if c.IsMaintenance() {
|
||||
c.log.Info("the node is under maintenance, skip initial bootstrap")
|
||||
return
|
||||
}
|
||||
err := c.bootstrap()
|
||||
fatalOnErrDetails("bootstrap error", err)
|
||||
}
|
||||
|
@ -294,6 +298,10 @@ func initNetmapState(c *cfg) {
|
|||
zap.String("state", stateWord),
|
||||
)
|
||||
|
||||
if ni != nil && ni.IsMaintenance() {
|
||||
c.isMaintenance.Store(true)
|
||||
}
|
||||
|
||||
c.cfgNetmap.state.setCurrentEpoch(epoch)
|
||||
c.cfgNetmap.startEpoch = epoch
|
||||
c.handleLocalNodeInfo(ni)
|
||||
|
|
Loading…
Reference in a new issue