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

Fixed kubectl cluster-info dump to support multi-container pod. #44088

Merged
merged 1 commit into from
Apr 18, 2017

Conversation

xingzhou
Copy link
Contributor

@xingzhou xingzhou commented Apr 5, 2017

Fixed kubectl cluster-info dump to support multi-container pod.

Release note:

Improve `kubectl cluster-info dump` to support multi-container pod information dump.

Fixed #44069

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 5, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @xingzhou. 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 @k8s-bot 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.

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. I understand the commands that are listed here.

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Apr 5, 2017
@grodrigues3 grodrigues3 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 5, 2017
@soltysh
Copy link
Contributor

soltysh commented Apr 6, 2017

@xingzhou the change looks good to me, but I'll ask @kubernetes/sig-cli-pr-reviews for confirmation. You might want to add a release not in the first comment, since this is changing behavior.

@k8s-bot ok to test

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2017
@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Apr 6, 2017
@chrisegner
Copy link

I think the patch does a good job of handling the multi-container case for a pod, but it seems like it might be better if an error talking to a single container didn't abort the whole cluster info dump. We're using this command in the case where we're attempting to understand a problem, so gathering as much info as possible has significant value.

@adohe-zz
Copy link

adohe-zz commented Apr 9, 2017

/assign @adohe

@adohe-zz
Copy link

adohe-zz commented Apr 9, 2017

 but it seems like it might be better if an error talking to a single container didn't abort the whole cluster info dump

sounds reasonable to me. @xingzhou could you please help improve this?

@xingzhou
Copy link
Contributor Author

Sure, @chrisegner and @adohe, let me update the patch

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Apr 10, 2017
@xingzhou
Copy link
Contributor Author

Have updated code to be tolerant on the container log request error, dears, please take a look at the latest patch, thanks!

if err != nil {
// Print error and carry on dumping other pods info.
writer.Write([]byte(fmt.Sprintf("Request log error: %s\n", err.Error())))
writer.Write([]byte(endMsg))
Copy link
Contributor

Choose a reason for hiding this comment

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

How about turning this loop body into a function and use defer for printing that message? This will ensure we have it printed always, esp. when introducing new branches here.

Fixed `kubectl cluster-info dump` to support multi-container pod.
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 11, 2017
@xingzhou
Copy link
Contributor Author

thanks @soltysh for your time, please take a look at the latest update

@soltysh soltysh removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Apr 11, 2017
@soltysh
Copy link
Contributor

soltysh commented Apr 11, 2017

@k8s-bot non-cri e2e test this

lgtm on my side, will leave for final approval from @adohe

@grodrigues3 grodrigues3 removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 13, 2017
@adohe-zz
Copy link

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 18, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adohe, soltysh, xingzhou

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 18, 2017
@adohe-zz
Copy link

@xingzhou just get time to review this, thanks for this.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 1ee8f2f into kubernetes:master Apr 18, 2017
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants