Skip to content

Commit 42a19a8

Browse files
authored
If target config is using node_proximity setting with NetworkTopologyProximity, do not try to set endpoint_snitch. This is the new behavior in 5.1 (trunk) (#76)
1 parent c33dbec commit 42a19a8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/config/builder.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,14 @@ func k8ssandraOverrides(merged map[string]interface{}, configInput *ConfigInput,
487487
merged["rpc_address"] = nodeInfo.RPCIP.String()
488488
delete(merged, "broadcast_address") // Sets it to the same as listen_address
489489
merged["broadcast_rpc_address"] = nodeInfo.BroadcastIP
490-
merged["endpoint_snitch"] = "GossipingPropertyFileSnitch"
490+
491+
// 5.1 and newer have deprecated endpoint_snitch
492+
if nodeProximity, found := merged["node_proximity"]; found && nodeProximity.(string) == "NetworkTopologyProximity" {
493+
merged["initial_location_provider"] = "RackDCFileLocationProvider"
494+
} else if !found {
495+
merged["endpoint_snitch"] = "GossipingPropertyFileSnitch"
496+
}
497+
491498
merged["cluster_name"] = configInput.ClusterInfo.Name
492499

493500
return merged

0 commit comments

Comments
 (0)