Skip to content

Commit

Permalink
admin/server: guard nodewise recovery with feature flag.
Browse files Browse the repository at this point in the history
reusing feature flag from enhanced force reconfiguration.
  • Loading branch information
bharathv committed Nov 29, 2023
1 parent 9dca991 commit 7f76cf5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/v/redpanda/admin/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3946,6 +3946,13 @@ parse_replicas_from_json(const json::Document::ValueType& value) {
ss::future<ss::json::json_return_type>
admin_server::force_recover_partitions_from_nodes(
std::unique_ptr<ss::http::request> request) {
if (!_controller->get_feature_table().local().is_active(
features::feature::enhanced_force_reconfiguration)) {
throw ss::httpd::bad_request_exception(
"Required feature is not active yet which indicates the cluster has "
"not fully upgraded yet, retry after a successful upgrade.");
}

if (need_redirect_to_leader(model::controller_ntp, _metadata_cache)) {
throw co_await redirect_to_leader(*request, model::controller_ntp);
}
Expand Down

0 comments on commit 7f76cf5

Please sign in to comment.