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: improve --exit-when-healthy in cluster health #16106

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

r-vasquez
Copy link
Contributor

--exit-when-healthy flag only makes sense with the --watch flag, so we enable now --watch if --exit-when-healthy is set.

Fixes #15818

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

Improvements

  • rpk cluster health: now --exit-when-healthy enables --watch when provided.

--exit-when-healthy flag only makes sense with the
--watch flag, so we enable now --watch if
--exit-when-healthy is set.
@vbotbuildovich
Copy link
Collaborator

@@ -65,7 +68,7 @@ following conditions are met:
p.InstallSASLFlags(cmd)

cmd.Flags().BoolVarP(&watch, "watch", "w", false, "Blocks and writes out all cluster health changes")
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "When used with watch, exits after cluster is back in healthy state")
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "Exits after cluster is back in healthy state")
Copy link
Contributor

@Deflaimun Deflaimun Jan 17, 2024

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "Exits after cluster is back in healthy state")
cmd.Flags().BoolVarP(&exit, "exit-when-healthy", "e", false, "Exits after cluster is back in a healthy state")

@r-vasquez r-vasquez merged commit 63d9b9b into redpanda-data:dev Jan 30, 2024
32 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--exit-when-healthy does not wait for the node to join the cluster first
5 participants