Skip to content
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 rpk command to show decommission progress #8268

Closed
daisukebe opened this issue Jan 17, 2023 · 6 comments · Fixed by #8376
Closed

rpk: add rpk command to show decommission progress #8268

daisukebe opened this issue Jan 17, 2023 · 6 comments · Fixed by #8376
Labels
area/rpk kind/enhance New feature or request

Comments

@daisukebe
Copy link
Contributor

daisukebe commented Jan 17, 2023

Who is this for and what problem do they have today?

#8167 has added a new endpoint /v1/brokers/<id>/decommission that reports a progress of a node decommissioning (aka partition reconfiguration), example below. We should add a handy rpk sub command that hooks up the endpoint and shows insights for operators.

Example raw output:

daisuke@dev-redpanda/ (dev) $ curl -s http://localhost:9644/v1/brokers/3/decommission | jq .
{
  "finished": false,
  "replicas_left": 3,
  "partitions": [
    {
      "ns": "kafka",
      "topic": "test2",
      "partition": 5,
      "moving_to": {
        "node_id": 3,
        "core": 1
      },
      "bytes_left_to_move": 99992645,
      "bytes_moved": 11796340,
      "partition_size": 111788985
    },
    {
      "ns": "kafka",
      "topic": "test2",
      "partition": 1,
      "moving_to": {
        "node_id": 3,
        "core": 1
      },
      "bytes_left_to_move": 100992922,
      "bytes_moved": 10796433,
      "partition_size": 111789355
    },
    {
      "ns": "kafka",
      "topic": "test2",
      "partition": 7,
      "moving_to": {
        "node_id": 3,
        "core": 1
      },
      "bytes_left_to_move": 100992989,
      "bytes_moved": 11211171,
      "partition_size": 112204160
    }
  ]
}

What are the success criteria?

I'm going to propose a new status command under brokers that reports something like below (just a handwritten example).

$ rpk redpanda brokers decommission-status 3
NAMESPACE-TOPIC PARTITION MOVING_TO PARTITION_SIZE COMPLETION
kafka/test2     7         3         112204160      70%
kafka/test      1         2         111788985      68%

Is the decommission-status sub-command appropriate? @r-vasquez @twmb
@masapanda @JFlath @jason-da-redpanda , I wanted to see how supporters feel. Does the example output above make sense?

Why is solving this problem impactful?

Improving supportability and usability

Additional notes

@daisukebe daisukebe added the kind/enhance New feature or request label Jan 17, 2023
@r-vasquez
Copy link
Contributor

+1 to decommission-status

I guess it should be next to the decommission command so it will be rpk redpanda admin brokers decommission-status 3

@twmb
Copy link
Contributor

twmb commented Jan 18, 2023

🚲🏠

  • Why not --status?
  • I'd probably drop NAMESPACE -- do we ever show non-kafka namespace?
  • I'd add BYTES-MOVED and BYTES-REMAINING (unless it looks ugly / potentially rename these)

@daisukebe
Copy link
Contributor Author

daisukebe commented Jan 18, 2023

Why not --status?

Do you mean something like this, rpk redpanda admin brokers decommission 3 --status? If no option it's making change to the system, but with option it's going to be just fetching the system status. If it's the way to go, I'm fine :)

do we ever show non-kafka namespace?

Yea, under kafka_internal there will be at least tx and id_allocator

I'd add BYTES-MOVED and BYTES-REMAINING (unless it looks ugly / potentially rename these)

+1

@daisukebe
Copy link
Contributor Author

My 2 cents:
Given the decommission command is a mutation request, I'd suppose it shouldn’t change the basic intention of the command with flags, correct? So that introducing a new status command sounds better to me. Wdyt @twmb @r-vasquez ?

@r-vasquez
Copy link
Contributor

@daisukebe A new command sounds better to me as well.

@daisukebe
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/enhance New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants