-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] move cloud snitches to external python script #444
base: next
Are you sure you want to change the base?
Conversation
Since it's hard to debug scylla-core's cloud snitch support, we want to move them out to python script. On the python script we will generate cassandra-rackdc.properties file, and scylla-core will read it via GossipingPropertyFileSnitch code. See scylladb/scylladb#12306
scylla-core part of the PR is at: scylladb/scylladb#13623 |
I implemented JavaPropertiesParser on scylla_cloud_snitch, it's modified version of sysconfig_parser, since the format is very similar. But there is a pip module to parse java properties https://pypi.org/project/javaproperties/, maybe we can consider to use it. |
TODO:
|
|
||
def start(self): | ||
# Split "us-east-1a" or "asia-1a" into "us-east"/"1a" and "asia"/"1a". | ||
splited_zone = self.__aws_instance.availability_zone().rsplit('-', 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only the legacy naming support
I think we should add the support for both:
https://cassandra.apache.org/doc/latest/cassandra/configuration/cass_rackdc_file.html#ec2_naming_scheme
and consider changing the default to match cassandra 4.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not that lot of code, but I would recommending having unittests coverage for it.
@avelanarius - hopefully, the drivers may be able to (re)use this functionality as well. |
This is scylla-machine-image part of "move cloud snitches to external python script" PR.
Currently this PR is DRAFT version since it doesn't implemented Ec2MultiRegionSnitch yet.
Since it's hard to debug scylla-core's cloud snitch support, we want to move them out to python script.
On the python script we will generate cassandra-rackdc.properties file, and scylla-core will read it via GossipingPropertyFileSnitch code.
See scylladb/scylladb#12306