-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 test/framework: improve logging of RunErrors occurring when bootstrap cluster creation fails #5908
🌱 test/framework: improve logging of RunErrors occurring when bootstrap cluster creation fails #5908
Conversation
…cluster creation fails Signed-off-by: Stefan Büringer buringerst@vmware.com
/assign @fabriziopandini |
/test pull-cluster-api-verify-main |
3 similar comments
/test pull-cluster-api-verify-main |
/test pull-cluster-api-verify-main |
/test pull-cluster-api-verify-main |
Giving up for now, unable to get the job to run on a non-broken node in the Prow cluster. |
/test pull-cluster-api-verify-main |
// Extract the details of the RunError, if the cluster creation was triggered by a RunError. | ||
var runErr *exec.RunError | ||
if errors.As(err, &runErr) { | ||
errStr += "\n" + string(runErr.Output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to append RunError.Inner error as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, but I wouldn't add it as it's already part of the err, i.e.:
-
err looks like this
Failed to create kind cluster "test-lt3j5f-5": failed to init node with kubeadm: command "docker exec --privileged test-lt3j5f-5-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1
-
the inner error would be
command "docker exec --privileged test-lt3j5f-5-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Stefan Büringer buringerst@vmware.com
What this PR does / why we need it:
This PR improves logging, so that RunErrors occurring when bootstrap cluster creation fails are readable.
This makes it possible to read not only the errors on the triage PR, but also the ones occurring in our periodics.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #