mirror of https://github.com/status-im/consul.git
Disallow -bootstrap-expect flag in dev mode (#2464)
This commit is contained in:
parent
9f2c965a63
commit
1b204eb88d
|
@ -271,6 +271,12 @@ func (c *Command) readConfig() *Config {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Expect can only work when dev mode is off
|
||||
if config.BootstrapExpect > 0 && config.DevMode {
|
||||
c.Ui.Error("Expect mode cannot be enabled when dev mode is enabled")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Expect & Bootstrap are mutually exclusive
|
||||
if config.BootstrapExpect != 0 && config.Bootstrap {
|
||||
c.Ui.Error("Bootstrap cannot be provided with an expected server count")
|
||||
|
|
|
@ -154,7 +154,7 @@ func (s *Server) lanNodeJoin(me serf.MemberEvent) {
|
|||
s.localLock.Unlock()
|
||||
}
|
||||
|
||||
// If we still expecting to bootstrap, may need to handle this.
|
||||
// If we're still expecting to bootstrap, may need to handle this.
|
||||
if s.config.BootstrapExpect != 0 {
|
||||
s.maybeBootstrap()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue