Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 64536 invoked from network); 16 Apr 2009 19:14:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Apr 2009 19:14:36 -0000 Received: (qmail 84512 invoked by uid 500); 16 Apr 2009 19:14:36 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 84485 invoked by uid 500); 16 Apr 2009 19:14:36 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 84475 invoked by uid 99); 16 Apr 2009 19:14:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2009 19:14:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2009 19:14:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 236F6234C045 for ; Thu, 16 Apr 2009 12:14:15 -0700 (PDT) Message-ID: <1829414183.1239909255143.JavaMail.jira@brutus> Date: Thu, 16 Apr 2009 12:14:15 -0700 (PDT) From: "Eric Evans (JIRA)" To: cassandra-commits@incubator.apache.org Subject: [jira] Commented: (CASSANDRA-43) Add configuration to choose which local IP-address to bind server on In-Reply-To: <1032296534.1238619913463.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.