Hello Marton Greber, Alexey Serbin, Zoltan Martonka, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24978
to look at the new patch set (#3).
Change subject: KUDU-3811 [tools] add 'kudu cluster location check'
......................................................................
KUDU-3811 [tools] add 'kudu cluster location check'
Before taking a location (rack, availability zone) offline, an operator
needs to know whether every tablet would keep a quorum. Neither ksck nor
the rebalancer answers that. This adds:
kudu cluster location check <master_addresses> [--location=L]
A location is safe to take offline if, for every tablet, the healthy
voters outside it form a majority of max(replication factor, voters in
config). Taking the larger covers a tablet being re-replicated, which
carries an extra voter, as well as an under-replicated one. Non-voters
and voters on unhealthy tablet servers don't count. Unlike
DetectPlacementPolicyViolations(), tablets are checked regardless of
their health.
Without --location, every location is checked. The action exits non-zero
if any location is unsafe or if --location names an unknown location. It
refuses to run unless every tablet server has a location. Having fewer
than 3 locations only produces a warning.
The result is a snapshot. Tablets with a Raft config change in progress
are listed in a notice, since their placement is about to change. To
detect replacements, ksck's consensus state now records each peer's
REPLACE attribute. Masters are not considered: Kudu does not assign them
locations, so check separately that the location doesn't hold a majority
of them.
location_maintenance-test covers the quorum arithmetic and the detection
of config changes; kudu-tool-test runs the action against multi-location
external mini clusters.
Change-Id: Ibd4cbaa8dab835d4d27270c06b4b0028aab8285b
Co-Authored-By: Claude Code <[email protected]>
---
M src/kudu/rebalance/cluster_status.h
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/ksck.cc
M src/kudu/tools/kudu-tool-test.cc
A src/kudu/tools/location_maintenance-test.cc
A src/kudu/tools/location_maintenance.cc
A src/kudu/tools/location_maintenance.h
M src/kudu/tools/tool_action_cluster.cc
8 files changed, 1,077 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/78/24978/3
--
To view, visit http://gerrit.cloudera.org:8080/24978
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibd4cbaa8dab835d4d27270c06b4b0028aab8285b
Gerrit-Change-Number: 24978
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>