Skip to content

Fix healthchecker execCommand output #860

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

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

chotiwat
Copy link
Contributor

https://pkg.go.dev/os/exec#Cmd.CombinedOutput returns ([]byte, error) so we need to cast the output as string before printing to make it readble. Currently, it prints out the byte slice like below.

2024-02-14T21:29:06.921706132Z stderr F  I0214 21:29:06.919561    4052 health_checker.go:89] kubelet is unhealthy, component uptime: 17h51m18.919560214s
2024-02-14T21:29:06.921708048Z stderr F I0214 21:29:06.919610    4052 health_checker.go:91] kubelet cooldown period of 1m0s exceeded, repairing
2024-02-14T21:29:06.921709574Z stderr F I0214 21:29:06.921176    4052 health_checker.go:180] command /bin/systemctl kill --kill-who=main kubelet failed: exit status 1, [70 97 105 108 101 100 32 116 111 32 107 105 108 108 32 117 110 105 116 32 107 117 98 101 108 101 116 46 115 101 114 118 105 99 101 58 32 78 111 32 109 97 105 110 32 112 114 111 99 101 115 115 32 116 111 32 107 105 108 108 10]

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 14, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @chotiwat. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 14, 2024
@hakman
Copy link
Member

hakman commented Feb 16, 2024

Thanks @chotiwat!
/ok-to-test
/lgtm
/cc @vteratipally

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 16, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 16, 2024
@vteratipally
Copy link
Collaborator

/lgtm
/approve

Thank you for the fix.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chotiwat, hakman, vteratipally

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit d1166d3 into kubernetes:master Feb 16, 2024
@chotiwat chotiwat deleted the patch-1 branch February 16, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants