rock icon indicating copy to clipboard operation
rock copied to clipboard

Multi-node elasticsearch cluster fails to sync

Open dcode opened this issue 5 years ago • 4 comments

Per elastic/elasticsearch@7d3ae5442537560de5578894699e0b08a9848fcb, the node name for master eligible nodes that are in the initial cluster discovery must match exactly the node name of the instance. This means that if fqdn's are used in the initial seed list, they must be used as node names. This bootstrap check will cause deploying a multi-node elastic cluster fail on RockNSM 2.4.1.

dcode avatar Apr 16 '19 13:04 dcode

This is still broken. We need to change the following line to use inventory_hostname as well: https://github.com/rocknsm/rock/blob/27c35e05775ea0ffdd5b0bb361d58aa1afd508f1/playbooks/templates/rock_config.yml.j2#L42

bndabbs avatar Apr 18 '19 20:04 bndabbs

Ah, yes. That.

dcode avatar Apr 18 '19 20:04 dcode

Actually, since es_node_name is defined in the group_vars, this should probably use that

dcode avatar Apr 18 '19 20:04 dcode

I had this exact issue happen. Although it was fixed in the role default vars, it was not fixed in the group vars. https://github.com/rocknsm/rock/blob/9fdf14fd7287080ee00eb42d11af3ff250af4491/playbooks/group_vars/all.yml#L142

It also needs to be changed in the playbook template https://github.com/rocknsm/rock/blob/f00feb7294631bf63e594c2caa4520b1300c50f8/playbooks/templates/rock_config.yml.j2#L42

Changing both from {{ ansible_hostname }} to {{ inventory_hostname }} fixed it for me.

axeljov avatar May 13 '19 16:05 axeljov