WaitForLeader times out before an election takes place #3205
Closed
Description
On a new cluster, If i do the following,
start up one node, wait more then 5 seconds, start up a second node
then the first server will hit the timeout here:
https://github.com/influxdb/influxdb/blob/master/meta/store.go#L402
and will wait endlessly here:
https://github.com/influxdb/influxdb/blob/master/cmd/influxd/run/server.go#L298
The first server is stuck trying to elect a leader. Once the other nodes come online then a leader is elected and the nodes are created properly, but the first node never completes the initialization and needs to be restarted
It seems to me as though there shouldn't be a timeout there. if the node doesn't exist and we need to meta.CreateLocalNode, then we shouldn't timeout prematurely