[
https://issues.apache.org/jira/browse/BOOKKEEPER-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13707574#comment-13707574
]
Flavio Junqueira commented on BOOKKEEPER-618:
---------------------------------------------
[[email protected]] The patch for 4.2 had the format for DNS.java according
to the guidelines of the project, but the trunk patch didn't, so 4.2 and trunk
do not have the same format for DNS.java. Are you planning on submitting a
patch to fix the format of trunk?
> Better resolution of bookie address
> -----------------------------------
>
> Key: BOOKKEEPER-618
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-618
> Project: Bookkeeper
> Issue Type: Improvement
> Components: bookkeeper-server
> Affects Versions: 4.2.1
> Reporter: Bryan Beaudreault
> Assignee: Ivan Kelly
> Priority: Minor
> Fix For: 4.2.2, 4.3.0
>
> Attachments:
> 0001-BOOKKEEPER-618-Better-resolution-of-bookie-address.patch,
> BOOKKEEPER-618.branch4-2.diff, BOOKKEEPER-618.branch4-2.diff
>
>
> Bookie#getBookieAddress uses the following code:
> {code:title=Bookie.java}
> /**
> * Return the configured address of the bookie.
> */
> public static InetSocketAddress getBookieAddress(ServerConfiguration conf)
> throws UnknownHostException {
> return new InetSocketAddress(InetAddress.getLocalHost()
> .getHostAddress(), conf.getBookiePort());
> }
> {code}
> This code is subject to the contents of one's /etc/hosts file, in that if
> they have an entry like {{127.0.0.1 myhostname}}, this method will return the
> same 127.0.0.1 address on all bookie servers. This causes conflicts due to
> the way bookies register in zookeeper.
> There should be an optional bk_server.conf setting to allow one to select
> their preferred network interface to use for the bookie. Then you could use
> something like
> {{NetworkInterface.getByName(PREFERRED_INTERFACE).getInetAddresses()}}
> instead. This method is not effected by the /etc/hosts.
> An alternative method of registering the bookie that does not rely on the
> local address would be another possible solution, such as using the DNS like
> other apache projects (hbase).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira