You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Patrik Sundberg (Code Review)" <ge...@cloudera.org> on 2017/05/09 14:32:42 UTC
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Patrik Sundberg has uploaded a new change for review.
http://gerrit.cloudera.org:8080/6827
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 66 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/1
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 8:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/6827/8/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 117: if (!options_.rpc_advertised_addresses.empty()) {
This should guard against port 0, as on line 111 above.
Line 210: for (const Sockaddr& addr : rpc_advertised_addresses_) {
Same comment as in the webserver; this can just use the copy ctor.
http://gerrit.cloudera.org:8080/#/c/6827/8/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
Line 207: RETURN_NOT_OK(ParseAddressList(opts_.webserver_advertised_addresses,
This should check for 0 port as well.
Line 308: for (const Sockaddr& addr : webserver_advertised_addresses_) {
This can be simpler as a copy construct:
*addresses = webserver_advertised_addresses_;
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Patrik Sundberg has uploaded a new patch set (#2).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 64 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/2
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 10:
(10 comments)
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/master/master.cc
File src/kudu/master/master.cc:
PS10, Line 241: web_server()->GetAdvertisedAddresses
Does it make sense to check for return code in this case?
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server-test.cc
File src/kudu/server/rpc_server-test.cc:
Line 19:
nit: consider adding at least
#include <memory>
#include <vector>
#include <gtest/gtest.h>
#include "kudu/util/net/sockaddr.h"
PS10, Line 38: string advertised = use_advertised_addresses();
nit: consider moving this after that if (!bind.empty()) { ... } closure
PS10, Line 50:
nit: strange shift (supposed to be 4 spaces)
PS10, Line 55:
nit: strange shift (supposed to be 4 spaces)
PS10, Line 66: const string
nit: what's use to return const by value? Maybe, turn this into 'const string&' ? or 'const char*' ?
PS10, Line 91: advertised_addrs.size(), 1
here is elsewhere in this file: the expected value should come first, that really helps when reading output when assertion fires.
PS10, Line 94: ASSERT_EQ(advertised_addrs[0].host(), "127.0.0.1");
: ASSERT_EQ(advertised_addrs[0].port(), 9999);
nit for here and elsewhere in the test: I think for readability it would be better to place those asserts close to the place where advertised_addrs are set, i.e. just after ASSERT_EQ(1, advertised_addrs.size());
PS10, Line 96: bound_addrs[0]
does it make sense to add an assert on the size of bound_addrs prior to accessing its first element?
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
PS10, Line 45: DEFINE_string(rpc_bind_addresses, "0.0.0.0",
: "Comma-separated list of addresses to bind to for RPC connections. "
: "Currently, ephemeral ports (i.e. port 0) are not allowed.");
: TAG_FLAG(rpc_bind_addresses, stable);
:
: DEFINE_string(rpc_advertised_addresses, "",
: "Comma-separated list of addresses to advertise externally for RPC connections. "
: "Currently, ephemeral ports (i.e. port 0) are not allowed.");
: TAG_FLAG(rpc_advertised_addresses, advanced);
Should advertised addresses be a subset of bind addresses? If yes, consider adding a group validator on that.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 10:
(19 comments)
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/CMakeLists.txt
File src/kudu/server/CMakeLists.txt:
Line 110: ADD_KUDU_TEST(rpc_server-test)
Nit: resort
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server-test.cc
File src/kudu/server/rpc_server-test.cc:
PS10, Line 30: RpcServerAdvertisedAddressesTest() {
: }
Nit: can omit
Line 42: opts.rpc_bind_addresses = "127.0.0.1:9898";
Can we avoid hardcoding ports in the bound addresses? It's going to make the test flaky. Can we test ephemeral ports only?
Line 48: gscoped_ptr<MetricRegistry> metric_registry(new MetricRegistry());
Nit: should use unique_ptr.
Line 53: std::shared_ptr<rpc::Messenger> messenger;
Add "using std::shared_ptr" and omit the prefix.
PS10, Line 54: builder.set_num_reactors(1)
: .set_min_negotiation_threads(1)
: .set_max_negotiation_threads(1)
: .set_metric_entity(metric_entity)
: .enable_inbound_tls();
Are all of these non-default settings needed for the test? If not, can you remove them? If so, can you add a little comment for each explaining why?
Line 59: builder.Build(&messenger);
ASSERT_OK on this.
PS10, Line 60: CHECK_OK(server_->Init(messenger));
: CHECK_OK(server_->Bind());
It's OK to use ASSERT_OK() in SetUp, I believe.
Line 69: gscoped_ptr<RpcServer> server_;
unique_ptr here too.
PS10, Line 89: vector<Sockaddr> advertised_addrs;
: ASSERT_OK(server_->GetAdvertisedAddresses(&advertised_addrs));
: ASSERT_EQ(advertised_addrs.size(), 1);
: vector<Sockaddr> bound_addrs;
: ASSERT_OK(server_->GetBoundAddresses(&bound_addrs));
Maybe add a test method that fetches the server's advertised and bound addresses in one go?
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 51: "Comma-separated list of addresses to advertise externally for RPC connections. "
Would be nice to include a sentence or two about how when to use this and not just rely on rpc_bind_addresses.
PS10, Line 124: LOG(FATAL) << "Advertising an ephemeral port is not supported (RPC advertised address "
: << "configured to " << addr.ToString() << ")";
We could do this via gflag validation, no? Just look for a :0 at the end of an address?
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver-test.cc
File src/kudu/server/webserver-test.cc:
Line 241: static_dir_ = GetTestPath("webserver-docroot");
This isn't used by any tests; can we just create it inline with opts.doc_root = ... ?
Line 265: AddDefaultPathHandlers(server_.get());
Is this necessary? We're not actually accessing the webserver.
Line 287: int32 use_webserver_port() const override { return 9999; }
Again, concerned about the flakiness of hard-coding a port here.
PS10, Line 298: vector<Sockaddr> advertised_addrs;
: ASSERT_OK(server_->GetAdvertisedAddresses(&advertised_addrs));
: ASSERT_EQ(advertised_addrs.size(), 1);
: vector<Sockaddr> bound_addrs;
: ASSERT_OK(server_->GetBoundAddresses(&bound_addrs));
Add a test method to fetch both sets of addresses?
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
PS10, Line 220: return Status::InvalidArgument("advertising an ephemeral webserver port is not supported",
: addr.ToString());
Again, let's validate this with a gflag validator.
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver_options.cc
File src/kudu/server/webserver_options.cc:
Line 46: DEFINE_string(webserver_advertised_addresses, "",
For consistency, shouldn't this be named webserver_advertised_interface?
Line 47: "Addresses to advertise externally for web connections."
Would be nice to add a sentence or two explaining when to use this in lieu of webserver_interface.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 10:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/6827/12//COMMIT_MSG
Commit Message:
PS12, Line 10:
Nit: don't need
http://gerrit.cloudera.org:8080/#/c/6827/12/src/kudu/server/rpc_server-test.cc
File src/kudu/server/rpc_server-test.cc:
Line 99: TEST_F(BoundOnlyWebserverTest, OnlyBoundAddresses) {
Should wrap these calls in NO_FATALS.
http://gerrit.cloudera.org:8080/#/c/6827/12/src/kudu/server/webserver-test.cc
File src/kudu/server/webserver-test.cc:
Line 299: ASSERT_OK(server_->GetAdvertisedAddresses(&advertised_addrs));
Need to wrap these in NO_FATALS().
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#7).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 300 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/7
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 8:
Patrik indicated he's tied up today, and I want to make sure this lands in time for 1.4, so I'm going to push the fixups today.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 10:
(35 comments)
http://gerrit.cloudera.org:8080/#/c/6827/10//COMMIT_MSG
Commit Message:
Line 7: KUDU-1988: add support for advertised host:port info.
> Can you add more detail info here?
Done
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/master/master.cc
File src/kudu/master/master.cc:
PS10, Line 241: web_server()->GetAdvertisedAddresses
> Does it make sense to check for return code in this case?
Done
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/CMakeLists.txt
File src/kudu/server/CMakeLists.txt:
Line 110: ADD_KUDU_TEST(rpc_server-test)
> Nit: resort
Done
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server-test.cc
File src/kudu/server/rpc_server-test.cc:
Line 19:
> nit: consider adding at least
Done
PS10, Line 30: RpcServerAdvertisedAddressesTest() {
: }
> Nit: can omit
Done
PS10, Line 38: string advertised = use_advertised_addresses();
> nit: consider moving this after that if (!bind.empty()) { ... } closure
Done
Line 42: opts.rpc_bind_addresses = "127.0.0.1:9898";
> Can we avoid hardcoding ports in the bound addresses? It's going to make th
Done
Line 48: gscoped_ptr<MetricRegistry> metric_registry(new MetricRegistry());
> Nit: should use unique_ptr.
Done
PS10, Line 50:
> nit: strange shift (supposed to be 4 spaces)
Done
Line 53: std::shared_ptr<rpc::Messenger> messenger;
> Add "using std::shared_ptr" and omit the prefix.
Done
PS10, Line 55:
> nit: strange shift (supposed to be 4 spaces)
Done
PS10, Line 54: builder.set_num_reactors(1)
: .set_min_negotiation_threads(1)
: .set_max_negotiation_threads(1)
: .set_metric_entity(metric_entity)
: .enable_inbound_tls();
> Are all of these non-default settings needed for the test? If not, can you
Done
Line 59: builder.Build(&messenger);
> ASSERT_OK on this.
Done
PS10, Line 60: CHECK_OK(server_->Init(messenger));
: CHECK_OK(server_->Bind());
> It's OK to use ASSERT_OK() in SetUp, I believe.
Done
PS10, Line 66: const string
> nit: what's use to return const by value? Maybe, turn this into 'const str
I've dropped the const.
Line 69: gscoped_ptr<RpcServer> server_;
> unique_ptr here too.
Done
PS10, Line 91: advertised_addrs.size(), 1
> here is elsewhere in this file: the expected value should come first, that
Done
PS10, Line 89: vector<Sockaddr> advertised_addrs;
: ASSERT_OK(server_->GetAdvertisedAddresses(&advertised_addrs));
: ASSERT_EQ(advertised_addrs.size(), 1);
: vector<Sockaddr> bound_addrs;
: ASSERT_OK(server_->GetBoundAddresses(&bound_addrs));
> Maybe add a test method that fetches the server's advertised and bound addr
Done
PS10, Line 94: ASSERT_EQ(advertised_addrs[0].host(), "127.0.0.1");
: ASSERT_EQ(advertised_addrs[0].port(), 9999);
> nit for here and elsewhere in the test: I think for readability it would be
This has been refactored a bit from Adar's suggestion, so I don't think I can do this anymore.
PS10, Line 96: bound_addrs[0]
> does it make sense to add an assert on the size of bound_addrs prior to acc
Done
http://gerrit.cloudera.org:8080/#/c/6827/8/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 117: if (!options_.rpc_advertised_addresses.empty()) {
> This should guard against port 0, as on line 111 above.
Done
Line 210:
> Same comment as in the webserver; this can just use the copy ctor.
Done
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 51: "Comma-separated list of addresses to advertise externally for RPC connections. "
> Would be nice to include a sentence or two about how when to use this and n
Done
PS10, Line 45: DEFINE_string(rpc_bind_addresses, "0.0.0.0",
: "Comma-separated list of addresses to bind to for RPC connections. "
: "Currently, ephemeral ports (i.e. port 0) are not allowed.");
: TAG_FLAG(rpc_bind_addresses, stable);
:
: DEFINE_string(rpc_advertised_addresses, "",
: "Comma-separated list of addresses to advertise externally for RPC connections. "
: "Currently, ephemeral ports (i.e. port 0) are not allowed.");
: TAG_FLAG(rpc_advertised_addresses, advanced);
> Should advertised addresses be a subset of bind addresses? If yes, conside
No, most likely they will be completely separate.
PS10, Line 124: LOG(FATAL) << "Advertising an ephemeral port is not supported (RPC advertised address "
: << "configured to " << addr.ToString() << ")";
> We could do this via gflag validation, no? Just look for a :0 at the end of
This is consistent with how it's handled above on line 111.
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver-test.cc
File src/kudu/server/webserver-test.cc:
Line 241: static_dir_ = GetTestPath("webserver-docroot");
> This isn't used by any tests; can we just create it inline with opts.doc_ro
Done
Line 265: AddDefaultPathHandlers(server_.get());
> Is this necessary? We're not actually accessing the webserver.
Done
PS10, Line 298: vector<Sockaddr> advertised_addrs;
: ASSERT_OK(server_->GetAdvertisedAddresses(&advertised_addrs));
: ASSERT_EQ(advertised_addrs.size(), 1);
: vector<Sockaddr> bound_addrs;
: ASSERT_OK(server_->GetBoundAddresses(&bound_addrs));
> Add a test method to fetch both sets of addresses?
Done
http://gerrit.cloudera.org:8080/#/c/6827/8/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
Line 207:
> This should check for 0 port as well.
Done
Line 308: for (int i = 0; i < num_addrs; i++) {
> This can be simpler as a copy construct:
Done
Line 314: return Status::OK();
> warning: parameter 'connection' is unused [misc-unused-parameters]
Done
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
PS10, Line 220: return Status::InvalidArgument("advertising an ephemeral webserver port is not supported",
: addr.ToString());
> Again, let's validate this with a gflag validator.
Can we punt on this? All of the validation in the webserver is currently done by Status, and changing this would mean rewriting a bunch of validation tests.
http://gerrit.cloudera.org:8080/#/c/6827/8/src/kudu/server/webserver.h
File src/kudu/server/webserver.h:
Line 62: virtual void RegisterPathHandler(const std::string& path, const std::string& alias,
> warning: default arguments on virtual or override methods are prohibited [g
ignoring
http://gerrit.cloudera.org:8080/#/c/6827/10/src/kudu/server/webserver_options.cc
File src/kudu/server/webserver_options.cc:
Line 46: DEFINE_string(webserver_advertised_addresses, "",
> For consistency, shouldn't this be named webserver_advertised_interface?
No, this flag doesn't split the address from the port like webserver_interface/webserver_port do.
Line 47: "Addresses to advertise externally for web connections."
> Would be nice to add a sentence or two explaining when to use this in lieu
Done
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 12:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/6827/12//COMMIT_MSG
Commit Message:
PS12, Line 10: -
> Nit: don't need
Done
http://gerrit.cloudera.org:8080/#/c/6827/12/src/kudu/server/rpc_server-test.cc
File src/kudu/server/rpc_server-test.cc:
Line 99: GetAddresses(&bound_addrs, &advertised_addrs);
> Should wrap these calls in NO_FATALS.
Done
http://gerrit.cloudera.org:8080/#/c/6827/12/src/kudu/server/webserver-test.cc
File src/kudu/server/webserver-test.cc:
Line 299: GetAddresses(&bound_addrs, &advertised_addrs);
> Need to wrap these in NO_FATALS().
Done
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#10).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 323 insertions(+), 12 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/10
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Prior to this change, it was difficult to deploy a Kudu cluster in
containerized environments where each container has a unique, local
subnetwork with an externally facing translation layer. In these
scenarios the network address that the Kudu server binds to is not the
externally-routable IP address. To overcome this, a set of new flags are
introduced, '--rpc-advertised-addresses' and
'--webserver-advertised-addresses' which allow administrators to
override the set of addresses which the Kudu server gives to external
servers and clients. Similar configurations are present in other
distributed systems, for example, Kafka's advertised.host.name property.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Reviewed-on: http://gerrit.cloudera.org:8080/6827
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 333 insertions(+), 13 deletions(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 14
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#13).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Prior to this change, it was difficult to deploy a Kudu cluster in
containerized environments where each container has a unique, local
subnetwork with an externally facing translation layer. In these
scenarios the network address that the Kudu server binds to is not the
externally-routable IP address. To overcome this, a set of new flags are
introduced, '--rpc-advertised-addresses' and
'--webserver-advertised-addresses' which allow administrators to
override the set of addresses which the Kudu server gives to external
servers and clients. Similar configurations are present in other
distributed systems, for example, Kafka's advertised.host.name property.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 333 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/13
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#9).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 317 insertions(+), 6 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/9
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#4).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 68 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/4
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#11).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Prior to this change, it was difficult to deploy a Kudu cluster in
containerized-environments where each container has a unique, local
subnetwork with an externally facing translation layer. In these
scenarios the network address that the Kudu server binds to is not the
externally-routable IP address. To overcome this, a set of new flags are
introduced, '--rpc-advertised-addresses' and
'--webserver-advertised-addresses' which allow administrators to
override the set of addresses which the Kudu server gives to external
servers and clients. Similar configurations are present in other
distributed systems, for example, Kafka's advertised.host.name property.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 333 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/11
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 11
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#3).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 68 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/3
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.h
File src/kudu/server/rpc_server.h:
Line 70: Status GetAdvertisedAddresses(std::vector<Sockaddr>* addresses) const WARN_UNUSED_RESULT;
> I have not checked yet, was meant to today but got sidelined. My thinking w
Oh interesting, if it's normal for the advertised address to be globally resolvable, then this way is fine.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#5).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 68 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/5
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Patrik Sundberg has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.h
File src/kudu/server/rpc_server.h:
Line 70: Status GetAdvertisedAddresses(std::vector<Sockaddr>* addresses) const WARN_UNUSED_RESULT;
> Oh interesting, if it's normal for the advertised address to be globally re
I'm not aware of a case where it wouldn't be intended to be resolvable on both sides of the private/public split that's causing us to want to use an advertised address. And for cases when you want to use an advertised address, your deployment would be such that you can know at least the hostname which will get the public IP at config time, so hence that's what you use in config as the advertised name. At runtime this will be guaranteed to resolve, as it'd be done before container is running.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#12).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Prior to this change, it was difficult to deploy a Kudu cluster in
containerized-environments where each container has a unique, local
subnetwork with an externally facing translation layer. In these
scenarios the network address that the Kudu server binds to is not the
externally-routable IP address. To overcome this, a set of new flags are
introduced, '--rpc-advertised-addresses' and
'--webserver-advertised-addresses' which allow administrators to
override the set of addresses which the Kudu server gives to external
servers and clients. Similar configurations are present in other
distributed systems, for example, Kafka's advertised.host.name property.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 333 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/12
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Hao Hao (Code Review)" <ge...@cloudera.org>.
Hao Hao has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 10:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/6827/10//COMMIT_MSG
Commit Message:
Line 7: KUDU-1988: add support for advertised host:port info.
Can you add more detail info here?
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#6).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
8 files changed, 68 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/6
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6827
to look at the new patch set (#8).
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
KUDU-1988: add support for advertised host:port info.
Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
---
M src/kudu/master/master.cc
M src/kudu/server/CMakeLists.txt
A src/kudu/server/rpc_server-test.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/server/webserver_options.cc
M src/kudu/server/webserver_options.h
M src/kudu/tserver/heartbeater.cc
11 files changed, 300 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/27/6827/8
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 4:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 121: }
Instead of doing the empty check again below in GetAdvertisedAdddresses, you could instead copy rpc_bind_addresses_ to rpc_advertised_addresses_ in an else block here.
Line 210: for (const Sockaddr addr : rpc_advertised_addresses_) {
Make this a 'const Sockaddr&', otherwise it does an additional implicit copy.
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.h
File src/kudu/server/rpc_server.h:
Line 70: Status GetAdvertisedAddresses(std::vector<Sockaddr>* addresses) const WARN_UNUSED_RESULT;
Have you tested this in your container setup? I'm worried that this interface is forcing hostnames to be resolved during server startup, so if a hostname is passed that can't be resolved by the server, it will fail. Similarly, if a hostname is passed that resolves differently in the container and externally, it won't work.
Changing this to use HostPort instead of Sockaddr would be
'late binding', but it would require some changes in the caller. See https://github.com/apache/kudu/blob/master/src/kudu/util/net/net_util.h#L65
http://gerrit.cloudera.org:8080/#/c/6827/2/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
PS2, Line 301: r<
nit: remove trailing whitespace
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
Line 208: 80,
Should this be opts.port?
Line 210: }
Same comment here about checking emptiness upfront vs on each access.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Patrik Sundberg (Code Review)" <ge...@cloudera.org>.
Patrik Sundberg has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 4:
(5 comments)
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.cc
File src/kudu/server/rpc_server.cc:
Line 121: }
> Instead of doing the empty check again below in GetAdvertisedAdddresses, yo
Done
Line 210: for (const Sockaddr addr : rpc_advertised_addresses_) {
> Make this a 'const Sockaddr&', otherwise it does an additional implicit cop
Done
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/rpc_server.h
File src/kudu/server/rpc_server.h:
Line 70: Status GetAdvertisedAddresses(std::vector<Sockaddr>* addresses) const WARN_UNUSED_RESULT;
> Have you tested this in your container setup? I'm worried that this interf
I have not checked yet, was meant to today but got sidelined. My thinking was that as the advertised IP tends to by definition be a "public" IP, it tends to always be resolvable by hosts on both internal and external networks. That's the case in my test lab using docker swarm, and would be the case using kubernetes on e.g. Google Cloud as well (my typical prod environment). I will for sure check though!
http://gerrit.cloudera.org:8080/#/c/6827/4/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:
Line 208: 80,
> Should this be opts.port?
possibly - I used how it's done for http_address_ up at line 120 as template, figured perhaps was a reason why it's 80 there and not opts.port.Looking again now I see http_address_ in the ctor is host:opts.port, and then it defaults to port 80 later in BuildListenSpec. So probably, yes I'll change to opts.port.
Line 210: }
> Same comment here about checking emptiness upfront vs on each access.
understood, I'll work out best way to initialize.
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] KUDU-1988: add support for advertised host:port info.
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: KUDU-1988: add support for advertised host:port info.
......................................................................
Patch Set 13: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/6827
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6735ca5630fc4c426bf72d0b21d6ef452173a890
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Patrik Sundberg <pa...@gmail.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No