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

feature: Add prune flag for nomad server force-leave command #18463

Merged
merged 7 commits into from
Sep 15, 2023

Conversation

nvanthao
Copy link
Contributor

This feature will help operator to remove a failed/left node from Serf layer immediately without waiting for 24 hours for the node to be reaped

  • Update CLI with prune flag
  • Update API /v1/agent/force-leave with prune query string parameter
  • Update CLI and API doc
  • Add unit test

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Hi @nvanthao! Thanks for the PR, this is a good start. I've left some comments that'll need to be addressed before this can be merged.

api/agent.go Outdated Show resolved Hide resolved
command/server_force_leave.go Outdated Show resolved Hide resolved
command/agent/agent_endpoint.go Outdated Show resolved Hide resolved
api/agent_test.go Outdated Show resolved Hide resolved
command/server_force_leave.go Outdated Show resolved Hide resolved
website/content/docs/commands/server/force-leave.mdx Outdated Show resolved Hide resolved
website/content/docs/commands/server/force-leave.mdx Outdated Show resolved Hide resolved
api/agent_test.go Outdated Show resolved Hide resolved
api/agent_test.go Outdated Show resolved Hide resolved
@tgross
Copy link
Member

tgross commented Sep 13, 2023

@nvanthao you'll want to rebase this on main and that'll get the remaining failing test working

@nvanthao
Copy link
Contributor Author

Many thanks @tgross! I have updated the PR with your latest feedback!

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Getting really close @nvanthao, I think this is the last round of issues.

command/agent/agent_endpoint.go Outdated Show resolved Hide resolved
website/content/api-docs/agent.mdx Outdated Show resolved Hide resolved
This feature will help operator to remove a failed/left node from Serf layer immediately
without waiting for 24 hours for the node to be reaped

* Update CLI with prune flag
* Update API /v1/agent/force-leave with prune query string parameter
* Update CLI and API doc
* Add unit test
@nvanthao
Copy link
Contributor Author

many thanks @tgross for being patient with me! next PRs will be better!

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for sticking with it @nvanthao!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.6.x backport to 1.6.x release line theme/api HTTP API and SDK issues theme/cli type/enhancement
Projects
Development

Successfully merging this pull request may close these issues.

Adding prune capabilties to nomad force-leave option
2 participants