rock
rock copied to clipboard
Multi-node elasticsearch cluster fails to sync
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.
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
Ah, yes. That.
Actually, since es_node_name
is defined in the group_vars, this should probably use that
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.