[kudu CLI] KUDU-2443 fix replica movement for RF=1

During replica replacement, if the leader replica is being replaced,
do not ask it to step down until the newly added replica transitions
into a voter role.  Otherwise, that might prevent tablet copying to
finish successfully under racy conditions in case of replication
factor of 1.

The workaround described above works OK for the case of moving/replacing
replicas in the context of KUDU-2443. The core of the underlying issue
will be addressed separately: see KUDU-2446 for details.

This changelist also contains a small clean-up in tool_action_tablet.cc
(the clean-up itself does not contain any functional changes).

Change-Id: I59ce249ae4e3bbcf42d8d754c68d1b92ab93f287
Reviewed-on: http://gerrit.cloudera.org:8080/10439
Reviewed-by: Mike Percy <mpercy@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit b73dec1e4975843a434cb84ab618aabedbfaa3b2)
Reviewed-on: http://gerrit.cloudera.org:8080/10467
Reviewed-by: Grant Henke <granthenke@apache.org>
Tested-by: Alexey Serbin <aserbin@cloudera.com>
1 file changed