elasticsearch/elasticsearch — pull request #6969 by bleskes (2014-07-22 22:05:21+00:00)
Title: [Discovery] verify we have a master after a successful join request

After master election, nodes send join requests to the elected master. Master is then responsible for publishing a new cluster state which sets the master on the local node's cluster state. If something goes wrong with the cluster state publishing, this process will not successfully complete. We should check it after the join request returns and if it failed, retry pinging.