Skip to content

Commit

Permalink
Fix discovery config in docker-compose docs (elastic#41753)
Browse files Browse the repository at this point in the history
Today's `docker-compose` docs are missing the `discovery.seed_nodes` config on
one of the nodes. With today's configuration the cluster can still form the
first time it is started, because `cluster.initial_master_nodes` requires both
nodes to bootstrap the cluster which ensures that each discover the other.
However if `es02` is elected master it will remove `es01` from the voting
configuration and then when restarted it will form a cluster on its own without
needing to do any discovery. Meanwhile `es01` doesn't know how to find `es02`
after a restart so will be unable to join this cluster.

This commit fixes this by adding the missing configuration.

Relates elastic#41394, which fixes a different `docker-compose.yml` in the same way.
  • Loading branch information
DaveCTurner authored and Gurkan Kaymak committed May 27, 2019
1 parent aa945c0 commit 8cdb990
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ services:
image: {docker-image}
environment:
- node.name=es01
- discovery.seed_hosts=es02
- cluster.initial_master_nodes=es01,es02
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD <1>
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Expand Down

0 comments on commit 8cdb990

Please sign in to comment.