cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Evans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-43) Add configuration to choose which local IP-address to bind server on
Date Thu, 16 Apr 2009 19:14:15 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699813#action_12699813
] 

Eric Evans commented on CASSANDRA-43:
-------------------------------------

First, a few minor issues/styling nits:

This patch makes the LocalIP config required, so test/conf/storage-conf.xml should be updated
accordingly or the tests fail.

Speaking of the directive, I can see where you got the name "LocalIP", but its purpose might
be more obvious if it were named something like "ListenInterface" or "BindInterface". Or "ListenAddress"
maybe?

If FBUtilities.isHostLocalHost() is no longer needed, it probably makes sense to just remove
it from the source altogether instead of commenting it out (it can always be retrieved from
history later if needed).

You should use a space between operators in your expressions, since that is the convention
used throughout the project.

Now, as to the functionality:

The way the patch is setup, it's expecting that a) either the address has been explicitly
configured, or b) that it is able to find at least one IPv4 interface with a non-loopback
address (and it will run with the last one it finds). If neither condition is met, an exception
is thrown and startup is prevented.

I'm not sure this is the best behavior. Firstly, I'd hate to start down a path that led to
no support for IPv6. Secondly, in the absence of a configuration, address selection is less
deterministic than what is in trunk (depends on order of interface/address enumeration versus
the host network configuration).

I think this needs to take one of two routes:

1. Everyone configures the interface to bind to. No exceptions. Throw an exception for missing
or invalid configuration.

2. The default (read: trunk) behavior is retained (i.e. InetAddress.getLocalHost()), which
can be overridden by configuration.

Personally, I favor #2 since it is the element of least surprise to those who already have
working clusters.



> Add configuration to choose which local IP-address to bind server on
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-43
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-43
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt, diff.txt, diff.txt, endpoint_diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Need a configuration to choose which local IP-address to bind server on

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message