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

[v24.1.x] rpk: Improve k8s bundle errors + better admin API fallback #19878

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #19473
Fixes: #19877,

Most of the time this step fails due to a
permission error.

(cherry picked from commit 87927b3)
If a user provides a configuration file without
redpanda.data_directory, rpk won't know where to
find the controller log dirs. We now provide a
better error message instead of:

* lstat redpanda/controller/0_0: no such file or directory

Either way, a configuration file (redpanda.yaml)
without a data_directory is an invalid config
file,

(cherry picked from commit 3ec0d6c)
When a command fails to run, rpk will return:

- couldn't save 'foo.txt': exit status 1

And will save stderr in foo.txt for full debugging.
This is not clear, so users may be lost about
what happened and won't know how to get pass this
error. We are adding a hint of where is the rest
of the error (which might be multiple lines of text)

(cherry picked from commit 63a367e)
Clusters deployed with helm/operator will now
have the rpk section of the redpanda.yaml filled
with the Admin API addresses of the cluster. We
fallback to these addresses in case rpk can't
discover the API addresses using the k8s API.

(cherry picked from commit 865af17)
Now we want to check if the authenticated user
account has authorization to collect the k8s
resources needed for the debug bundle process.

If not, we avoid running all the steps and instead
providing a single, meaningful error message
with a hint on how to solve this (link to our docs).

(cherry picked from commit e779bf3)
@vbotbuildovich vbotbuildovich requested a review from twmb as a code owner June 18, 2024 17:44
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Jun 18, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jun 18, 2024
@r-vasquez r-vasquez merged commit bda8824 into redpanda-data:v24.1.x Jun 19, 2024
23 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.9 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants