thelastpickle / cassandra-reaper

Automated Repair Awesomeness for Apache Cassandra
http://cassandra-reaper.io/
Apache License 2.0
490 stars 218 forks source link

Disable dns caching in reaper #1297

Open dnugmanov opened 1 year ago

dnugmanov commented 1 year ago

Project board link

Now cassandra-reaper used in k8ssandra-operator project, due to running cassandra in k8s, ips of nodes are ephemeral(they can changed after restart node). Currently reaper resolved only one time k8ssandra all-dc-pods-service and after restart cassandra, reaper cant connect to previous cached contact points ips

We suggest add advanced.resolve-contact-points = false option and always resolve dns on new connection

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: REAP-58

18ab21 commented 1 year ago

Option advanced.resolve-contact-points = false supported only in cassandra-driver 4.x versions. For 3.x version we use this solution .builder() .addContactPoint { InetSocketAddress.createUnresolved(config.host, config.port) } .withCredentials(config.credentials.login, config.credentials.password) .build()