Bankim Bhavsar has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17516 )

Change subject: [master] KUDU-2181 Fix duplicate master address and remove 
unsafe flag tag
......................................................................

[master] KUDU-2181 Fix duplicate master address and remove unsafe flag tag

While testing add master on a physical cluster, observed that
supplying only hostnames without port resulted in duplicates
being supplied to bring up new master which in turn leads
to failure in creating distributed Raft config on startup.

For e.g. kudu master add hp1,hp2 h2

Reason being hp2 is compared as hp2:7051 whereas in the vector
of strings "master_addresses", it contains hp1,hp2.

This changes adds a new function ParseAddresses() in HostPort class
that's a variant of existing ParseStrings() function and takes
a vector of strings instead. This new function is used
in the duplicate detection logic.

This change also removes the unsafe tag from
--master_addr_add_new_master as the feature is ready but keeps
it hidden as it's only meant to be used by the add master orchestration
tool.

This one is tricky to test locally and write a test because
we need to specify ports for starting masters/tservers.
Verified the fix on physical cluster. Along with CM integration
we can add a systest later.

Change-Id: Icf29730e3a6b225adb24ff161cac2ad777b46b81
Reviewed-on: http://gerrit.cloudera.org:8080/17500
Tested-by: Bankim Bhavsar <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
(cherry picked from commit 261d71ef71fcfdf96c26c9d604d6fc0147c2ee6a)
Reviewed-on: http://gerrit.cloudera.org:8080/17516
Tested-by: Kudu Jenkins
---
M src/kudu/master/sys_catalog.cc
M src/kudu/tools/tool_action_master.cc
M src/kudu/util/net/net_util.cc
M src/kudu/util/net/net_util.h
4 files changed, 27 insertions(+), 12 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Kudu Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/17516
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.15.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf29730e3a6b225adb24ff161cac2ad777b46b81
Gerrit-Change-Number: 17516
Gerrit-PatchSet: 2
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to