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

Admin API endpoints for nodewise recovery #194

Merged
merged 19 commits into from
Aug 20, 2024
Merged

Conversation

kbatuigas
Copy link
Contributor

@kbatuigas kbatuigas commented Dec 19, 2023

Copy link

netlify bot commented Dec 19, 2023

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit 321d9fc
🔍 Latest deploy log https://app.netlify.com/sites/redpanda-docs-preview/deploys/66c4c8426735960008eec650
😎 Deploy Preview https://deploy-preview-194--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

summary: Get partitions with lost majority
description: List of partitions with lost majority given an input set of dead nodes.
operationId: majority_lost
# responses:
Copy link
Contributor Author

@kbatuigas kbatuigas Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check - spec indicates "void" but this should return something like an array? Is this the response schema?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, "void" is a mistake, this endpoint returns an array of ntp_with_majority_loss

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ztlpn can we update the spec to be accurate please? This will be important because we are trying to automate Admin API doc generation from the spec moving forward. Thanks

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paging @bharathv as the main author :)

Although I would say that problems with keeping schemas for request bodies in sync with the code are bound to appear because they these schemas are not used anywhere (we do separate validation in the admin server code).

in: query
required: true
schema:
type: string
Copy link
Contributor Author

@kbatuigas kbatuigas Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bharathv this spec indicates query parameter for this API call. The force recover operation requires an input array of nodes in the API request body. Just want to double check that both are correct. Does the request URL look something like /partitions/majority_lost?dead_nodes=1,3,5 ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/partitions/majority_lost?dead_nodes=1,3,5

yes you are correct, thats how the URL looks. A GET with a request_body is not considered a standard practice in the implementations, so I had to use a query parameter.
redpanda-data/redpanda#13943 (comment)

@kbatuigas kbatuigas assigned kbatuigas and unassigned greg-szrama Jun 24, 2024
@kbatuigas kbatuigas requested a review from bharathv June 24, 2024 17:24
@kbatuigas kbatuigas marked this pull request as ready for review June 24, 2024 17:24
@kbatuigas kbatuigas requested a review from a team as a code owner June 24, 2024 17:24
@kbatuigas kbatuigas marked this pull request as draft June 25, 2024 14:41
@kbatuigas kbatuigas force-pushed the admin-api-nodewise-recovery branch from 58f3de0 to ded8d0c Compare July 10, 2024 15:48
@Feediver1
Copy link
Contributor

What's the latest status of this PR @kbatuigas ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakeSCahill should this work to add a "slot" for this particular method? I see a slot element show up in the HTML source but it doesn't actually render.

Copy link
Contributor

@JakeSCahill JakeSCahill Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a fix here ea0d3ea

The syntax is {method}-{path} for the directory name (without the curly braces).

In order to support this, I needed to adjust our UI here: redpanda-data/docs-ui#217

You won't see the slot until the UI change is merged.

@kbatuigas kbatuigas marked this pull request as ready for review August 12, 2024 18:08
in: query
required: true
schema:
type: string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/partitions/majority_lost?dead_nodes=1,3,5

yes you are correct, thats how the URL looks. A GET with a request_body is not considered a standard practice in the implementations, so I had to use a query parameter.
redpanda-data/redpanda#13943 (comment)

@kbatuigas kbatuigas merged commit 82af7a2 into api Aug 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants