-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpk: add support for recovery mode #14394
Comments
#14236 contains only code related to the first bullet point. I'll publish a pr with APIs needed for remaining bullet points shortly, will link it here. |
#14461 adds APIs for setting/listing disabled partitions. Doesn't include any real effects but it should be enough to unblock implementing rpk support. |
Note that for consistency with other admin API endpoints I added a namespace argument to the path. So |
just merged #14461, should unblock this issue |
Thanks @ztlpn. For the Admin API request, is it fine if I send the request to any node in the cluster, or should the request be directed to the leader only? |
@r-vasquez GETs can be sent to any node (but for nodes other than controller leader, results can be slightly out of date). POSTs should be sent to the controller leader (other nodes will reply with a redirect). |
@ztlpn If I disable a single partition of a topic ( I'm getting the opposite: # Disable a single partition [1]
$ curl -X POST localhost:9644/v1/cluster/partitions/kafka/baz/1 -d '{"disabled":true}'
# I see that it's disabled:
$ curl localhost:9644/v1/cluster/partitions/kafka/baz?disabled=true
[{"ns": "kafka", "topic": "baz", "partition_id": 1, "replicas": [{"node_id": 2, "core": 2},{"node_id": 0, "core": 2},{"node_id": 1, "core": 2}], "disabled": true}]
# Then I try to enable ALL partitions
$ curl -X POST localhost:9644/v1/cluster/partitions/kafka/baz -d '{"disabled":false}'
# But I still see the partition [1] disabled
$ curl localhost:9644/v1/cluster/partitions/kafka/baz\?disabled=true
[{"ns": "kafka", "topic": "baz", "partition_id": 1, "replicas": [{"node_id": 2, "core": 2},{"node_id": 0, "core": 2},{"node_id": 1, "core": 2}], "disabled": true}]% Is this expected? If I disable the enable the single partition back, it's fine though. |
@r-vasquez yes, this is a bug, thanks for catching! I'll fix it shortly |
fix for the bug above: #15071 |
we also need this small thing: #15104 |
This ticket tracks the rpk side of recovery mode.
What we will need to change:
recovery
as an option forrpk redpanda mode
. This will set the redpanda.recovery_mode_enabled field in redpanda.yaml to true (see PR https://github.com/redpanda-data/redpanda/pull/14236/files#diff-54ec8d4efd0da0b3ad48dc6dce13b1599b402f1382fdea16408b2d2148f36726R168)rpk cluster partitions enable
andrpk cluster partitions disable
, both of which support --topic, --partition. Note we want the flags here to be similar to otherrpk cluster partitions
commands.rpk cluster partitions list
(exists) with an option to filter for disabled. Maybe we always want to print whether something is disabled, too?The proposed admin APIs are:
These should be in this PR: #14236
The text was updated successfully, but these errors were encountered: