Skip to content

Commit

Permalink
Merge pull request #10 from burmanm/fix_snitch
Browse files Browse the repository at this point in the history
Enforce snitch to be GossipingPropertyFileSnitch always in k8ssandra
  • Loading branch information
burmanm authored Aug 15, 2023
2 parents 73bae73 + e6b6a82 commit e5ae32c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/config/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ func k8ssandraOverrides(merged map[string]interface{}, configInput *ConfigInput,
merged["rpc_address"] = nodeInfo.RPCIP.String()
delete(merged, "broadcast_address") // Sets it to the same as listen_address
merged["broadcast_rpc_address"] = nodeInfo.BroadcastIP
merged["endpoint_snitch"] = "GossipingPropertyFileSnitch"

return merged
}
Expand Down
1 change: 1 addition & 0 deletions pkg/config/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func TestCassandraYamlWriting(t *testing.T) {
seedProviders := cassandraYaml["seed_provider"].([]interface{})
seedProvider := seedProviders[0].(map[string]interface{})
require.Equal("org.apache.cassandra.locator.K8SeedProvider", seedProvider["class_name"])
require.Equal("GossipingPropertyFileSnitch", cassandraYaml["endpoint_snitch"])

listenIP := nodeInfo.ListenIP.String()
require.Equal(listenIP, cassandraYaml["listen_address"])
Expand Down

0 comments on commit e5ae32c

Please sign in to comment.