scylladb / scylla-ansible-roles

Ansible roles for deploying and managing Scylla, Scylla-Manager and Scylla-Monitoring
44 stars 38 forks source link

wait for cluster to become healthy needs to be aware of multi-dc #20

Closed tarzanek closed 1 year ago

tarzanek commented 3 years ago

https://github.com/scylladb/scylla-ansible-roles/blob/master/ansible-scylla-node/tasks/common.yml#L225

assumes the size of UN will be equal to number of scylla nodes

which if you add a DC to existing cluster isn't true the check needs to support multi-DC

dyasny commented 3 years ago

Why not simply have all the nodes from all the DCs in the inventory? the dc is a per-node setting, not a grouping

tarzanek commented 3 years ago

yes, that would be an option too, however if we lack access to other nodes, we would need just fine granularity focused only on the single DC that was added

dyasny commented 3 years ago

Not really. The code counts the number of scylla ndoes in the inventory (something stored in a local file, no need to access all the nodes) and looks at nodetool status on the nodes. Yes, in a case when the script needs to iterate over all the nodes, this can be a problem, but in plays where you are scaling for example, the playbook should only touch the relevant nodes.

If you have a better way of determining the cluster is healthy and ready to proceed, I'm open to ideas of course :)

tarzanek commented 3 years ago

workaround is of course full_inventory: false

vladzcloudius commented 1 year ago

@tarzanek Is this still relevant? I think this wasn't relevant from the start since the check in question is correct even for a multi-DC case since all nodes in all DCs are supposed to be up as long as they are in the inventory.ini.

Closing. Re-open if needed.