scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
20 stars 62 forks source link

cluster: prepare: support multi rack #519

Closed bhalevy closed 8 months ago

bhalevy commented 8 months ago

Support a rack member in Node and allow specifying datacenter racks by extending the nodes parameter to prepare supported notations as follows:

# nodes can be provided in multiple notations, determining the cluster topology:
# 1. int - specifying the number of nodes in a single DC, single RACK cluster
# 2. list[int] - specifying the number of nodes in a multi DC, single RACK per DC cluster
#    The datacenters are automatically named as dc{i}, starting from 1, the rack is named RAC1
# 3 dict[str, int|list|dict] - specifying the number of nodes in a multi DC, single or multi RACK per DC cluster
#   The dictionary keys explicitly identify each datacenter name, and the value is either:
#   a. int - the number of nodes in the DC.
#   b. list[int] - the number of nodes in each rack in the datacenter.
#   c. dict[str, int] - the number of nodes in each named rack in the datacenter.

The motivation for doing so is for adding dtests testing mult-rack topologies.

Refs https://github.com/scylladb/scylla-dtest/issues/3681 Fixes scylladb/scylla-ccm#518

fruch commented 8 months ago

I could guess the reason we want it,

But it would be nice to mention why we need this change.

(And why the way we do it in dtest currently isn't good enough)

fruch commented 8 months ago

I could guess the reason we want it,

But it would be nice to mention why we need this change.

(And why the way we do it in dtest currently isn't good enough)

Now I've seen the issue asking for this, but we should reference it.

bhalevy commented 8 months ago

In https://github.com/scylladb/scylla-ccm/commit/bbfa12bdf289ffa9dd12ec07a5d36a08a77fc2ec:

bhalevy commented 8 months ago

fixed CI error