仓库指标
- Star
- (29,891 star)
- PR 合并指标
- (平均合并 8天 12小时) (30 天内合并 41 个 PR)
描述
It is unclear to me from the docs of start_join/retry_join whether this value should contain all consul servers that I want in the cluster, or only the other ones (not the current machine).
Looking at a 3-node cluster boostrapping from a automatic deployment, it seems to me that it has to be the latter, because otherwise if retry_join = [machine1, machine2, machine3]:
- machine1 boots up first, sees only itself, joins itself
- machine2 and 3 boot at the same time a bit later, try to join each other first, which succeeds
Because the behaviour of retry_join is "Takes a list of addresses to attempt joining every retry_interval until at least one join works" instead of "until all joins work", each none of the machines try to join any other machines.
So due to this race we end up in a situation where we have 2 split clusters {machine1} and {machine2,machine3}, as opposed to the desired {machine1,machine2,machine3}. And it stays that way.
And then we get lots of agent: failed to sync remote state: No cluster leader.
Is this analysis correct?