Bankim Bhavsar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16340
Change subject: [master] KUDU-3182 Allow single master to specify --master_addresses ...................................................................... [master] KUDU-3182 Allow single master to specify --master_addresses 'last_known_addr' field is not persisted for a single master Raft configuration. This is okay as long as we have a single master configuration. On dynamically transitioning from single master to two master configuration, ChangeConfig() request to ADD_PEER fails the validation in VerifyRaftConfig(). Inorder to transition to multi-master configuration, 'last_known_addr' must be specified. Some options considered were using the --rpc_bind_addresses flag, if specified. If not, use GetHostName(). None of these are reliable. So it's best to let user to specify the address of the single master as is the case for specifying master address in tablet servers. Currently --master_addresses flag must be empty for single master configuration and --master_addresses with single address is not permitted. So the idea is to use existing --master_addresses flag for single master configuration too and not just distributed configuration. This change allows specifying --master_addresses flag for single master configuration. To be compatible with existing deployments, specifying this flag for single master configurations is still optional and not required. If specified, it's used to set the 'last_known_addr' field in the master Raft configuration. This change is a pre-requisite for upcoming dynamic multi-master changes. Change-Id: I4fe1bcd217d68f66db72c321397d596cba4224be --- M src/kudu/master/CMakeLists.txt M src/kudu/master/master.cc A src/kudu/master/master_options-test.cc M src/kudu/master/master_options.cc M src/kudu/master/master_options.h M src/kudu/master/master_path_handlers.cc M src/kudu/master/sys_catalog.cc M src/kudu/mini-cluster/external_mini_cluster.cc M src/kudu/mini-cluster/internal_mini_cluster.cc 9 files changed, 155 insertions(+), 12 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/40/16340/1 -- To view, visit http://gerrit.cloudera.org:8080/16340 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4fe1bcd217d68f66db72c321397d596cba4224be Gerrit-Change-Number: 16340 Gerrit-PatchSet: 1 Gerrit-Owner: Bankim Bhavsar <[email protected]>
