michaelklishin / cassandra-chef-cookbook

Chef cookbook for Apache Cassandra, DataStax Enterprise (DSE) and DataStax agent
Apache License 2.0
163 stars 228 forks source link

Should allow configurable agent_rpc_broadcast_address in address.yaml #223

Open ryan-ju opened 9 years ago

ryan-ju commented 9 years ago

Consider this case:

  1. OpsCenter server and Cassandra cluster are deployed in the same network, let's say 10.0.0.0/24.
  2. Cassandra node0 has listen_address = 10.0.0.100, broadcast_address = 10.0.0.100, rpc_address = 0.0.0.0, broadcast_rpc_address = 54.2.3.100 (this is the public IP assigned by AWS, let's say)

Now when OpsCenter tries to connect to the agent of node0, it learns about other nodes' broadcast_rpc_address (this is the value if you do 'select rpc_address from "OpsCenter".peers' in cqlsh). It then tries to connect to the node with that public IP.

However, this can fail if there is firewall configured to block external connections (e.g. a firewall whitelisting). Hence it is important to allow agent_rpc_broadcast_address to be configured differently.

Another property is local_interface. I am not sure how it is used (although here says it is used to identify the node, but doesn't say how). Maybe make it configurable too?

michaelklishin commented 9 years ago

@ryan-ju makes sense. Feel free to look into a pull request.