tools/scylla-nodetool: implement the decommission command
This commit is contained in:
12
test/nodetool/test_nodeops.py
Normal file
12
test/nodetool/test_nodeops.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Copyright 2023-present ScyllaDB
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#
|
||||
|
||||
from rest_api_mock import expected_request
|
||||
|
||||
|
||||
def test_decommission(nodetool):
|
||||
nodetool("decommission", expected_requests=[
|
||||
expected_request("POST", "/storage_service/decommission")])
|
||||
@@ -347,6 +347,11 @@ void compactionhistory_operation(scylla_rest_client& client, const bpo::variable
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void decommission_operation(scylla_rest_client& client, const bpo::variables_map& vm) {
|
||||
client.post("/storage_service/decommission");
|
||||
}
|
||||
|
||||
void disableautocompaction_operation(scylla_rest_client& client, const bpo::variables_map& vm) {
|
||||
if (!vm.count("keyspace")) {
|
||||
for (const auto& keyspace : get_keyspaces(client)) {
|
||||
@@ -773,6 +778,16 @@ Fore more information, see: https://opensource.docs.scylladb.com/stable/operatin
|
||||
},
|
||||
compactionhistory_operation
|
||||
},
|
||||
{
|
||||
{
|
||||
"decommission",
|
||||
"Deactivate a selected node by streaming its data to the next node in the ring",
|
||||
R"(
|
||||
Fore more information, see: https://opensource.docs.scylladb.com/stable/operating-scylla/nodetool-commands/decommission.html
|
||||
)",
|
||||
},
|
||||
decommission_operation
|
||||
},
|
||||
{
|
||||
{
|
||||
"disableautocompaction",
|
||||
|
||||
Reference in New Issue
Block a user