Perform the removal
When you remove any Kudu masters from a multi-master deployment, you need to rewrite
the Raft configuration on the remaining masters, remove data and WAL directories from the
unwanted masters, and finaly modify the value of the
configuration parameter for the tablet servers to remove the unwanted masters. You need to bring
the Kudu clusters down. Therefore, identify at least a one-hour maintenance window for this
Rewrite the Raft configuration on the remaining masters to include only the remaining
$ sudo -u kudu kudu local_replica cmeta rewrite_raft_config --fs_wal_dir=<master_wal_dir> [--fs_data_dirs=<master_data_dir>] <tablet_id> <all_masters>
The existing master’s previously recorded data directory
This must be set to the string,
A space-separated list of masters, both new and existing. Each entry in the list must be a string of the form
The master’s previously recorded UUID.
The master’s previously recorded hostname or alias.
The master’s previously recorded RPC port number.
- For example:
$ sudo -u kudu kudu local_replica cmeta rewrite_raft_config --fs_wal_dir=/data/kudu/master/wal --fs_data_dirs=/data/kudu/master/data 00000000000000000000000000000000 4aab798a69e94fab8d77069edff28ce0:master-1:7051 f5624e05f40649b79a757629a69d061e:master-2:7051 988d8ac6530f426cbe180be5ba52033d:master-3:7051
- Remove the data directories and WAL directory on the unwanted masters. This is a precaution to ensure that they cannot start up again and interfere with the new multi-master deployment.
Modify the value of the
master_addressesconfiguration parameter for the masters of the new multi-master deployment. See Apache Kudu configuration for the steps to modify a configuration parameter. If migrating to a single-master deployment, the
master_addressesflag should be omitted entirely.
Start all of the masters that were not removed.
Modify the value of the
tserver_master_addrsconfiguration parameter for the tablet servers to remove any unwanted masters. See Apache Kudu configuration for the steps to modify a configuration parameter.
- Start all of the tablet servers.
Using a browser, visit each master’s web UI and navigate to the
/masterspage. All the masters should now be listed there with one master in the
LEADERrole and the others in the
FOLLOWERrole. The contents of
/masterson each master should be the same.
Run a Kudu system check (
ksck) on the cluster using the
kuducommand line tool.