[
https://issues.apache.org/jira/browse/CASSANDRA-11356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404405#comment-15404405
]
Paulo Motta commented on CASSANDRA-11356:
-----------------------------------------
On EC2 users need to choose which {{rpc_address}} to broadcast to other nodes:
if the private IP or the public IP (since both are routable to the private IF).
Before CASSANDRA-5899 it broadcasted {{rpc_address}} which defaulted to
{{listen_address}}, which was typically set to private IP on EC2 deployments.
CASSANDRA-5899 added ability to choose which IP to broadcast via the
{{broadcast_rpc_address}}, but it also changed {{Ec2MultiRegionSnitch}} to
*always* broadcast the public IP, regardless of {{broadcast_rpc_address}}, what
makes impossible for nodes to advertise their private IP for client connections
if they want to.
This patch updates {{Ec2MultiRegionSnitch}} to only set
{{broadcast_rpc_address}} to the public IP if this property is unset, allowing
operators to overide this to the private IP if they want to.
Before {{DatabaseDescriptor}} was setting {{broadcastRpcAddress = rpcAddress}},
so it was impossible to know if {{broadcastRpcAddress == null}} in order to
decide whether or not to override the property on {{Ec2MultiRegionSnitch}}, so
I modified all uses of {{DatabaseDescriptor.getBroadcastRpcAddress()}} to use
{{FBUtilities.getBroadcastRpcAddress()}} instead which will fallback to
{{DatabaseDescriptor.getRpcAddress()}} if
{{DatabaseDescriptor.getBroadcastRpcAddress() == null}}.
Patch and tests available below:
||2.2||3.0||3.9||trunk||
|[branch|https://github.com/apache/cassandra/compare/cassandra-2.2...pauloricardomg:2.2-11356]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-11356]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.9...pauloricardomg:3.9-11356]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-11356]|
|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-11356-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-11356-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.9-11356-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11356-testall/lastCompletedBuild/testReport/]|
|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-11356-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-11356-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.9-11356-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-11356-dtest/lastCompletedBuild/testReport/]|
Could you have a look [~thobbs]? Thanks!
> EC2MRS ignores broadcast_rpc_address setting in cassandra.yaml
> --------------------------------------------------------------
>
> Key: CASSANDRA-11356
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11356
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Thanh
> Assignee: Paulo Motta
> Fix For: 2.2.x, 3.x
>
>
> EC2MRS ignores broadcast_rpc_address setting in cassandra.yaml. This is
> problematic for those users who were using EC2MRS with an internal
> rpc_address before the change introduced in
> [CASSANDRA-5899|https://issues.apache.org/jira/browse/CASSANDRA-5899],
> because the change results in EC2MRS always using the public ip regardless of
> what the user has set for broadcast_rpc_address.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)