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

print nodes for those metrics is somehow unreachable #64389

Merged

Conversation

yue9944882
Copy link
Member

@yue9944882 yue9944882 commented May 28, 2018

What this PR does / why we need it:

When we use kubectl top nodes, some nodes will be ignored when their metrics cannot be fetched from metrics serve. It might be misleading for users.

This PR helps print the missing nodes like:

NAME                CPU(cores)   CPU%      MEMORY(bytes)   MEMORY%  
missing-nodes       -            -         -               -

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 #63986

Special notes for your reviewer:

Release note:

Fixes missing nodes lines when kubectl top nodes

@k8s-ci-robot k8s-ci-robot added 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. labels May 28, 2018
@k8s-ci-robot k8s-ci-robot requested review from adohe-zz and eparis May 28, 2018 09:16
@yue9944882
Copy link
Member Author

/kind bug
/sig cli

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels May 28, 2018
@adohe-zz
Copy link

overall LGTM. I am not quite sure whether we should use - or other more meaningful words here, could refer other kubectl code.

@cgthayer
Copy link

Looks good to me :-D thanks

@yue9944882
Copy link
Member Author

@adohe Thanks.

Seems like there's no such a centric definition as -. A similar usage of <unknown> is found in name printer which could be considered as an example for this. Also <none> is previously used but <unknown> should be better for describing metrics status.


Note that <unknown> is hardcoded across the project (both in client and server) without a centric definition. As of now, I think we could just print it hardcodedly like previous implementation before someone come up with a PR solving this mess. And such a PR should make some changes to "server-side print" together.

@adohe-zz
Copy link

adohe-zz commented Jun 6, 2018

cool~ let's just keep using <unknown> here.

@adohe-zz
Copy link

adohe-zz commented Jun 6, 2018

/assign @adohe

@adohe-zz
Copy link

adohe-zz commented Jun 6, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 6, 2018
@adohe-zz
Copy link

adohe-zz commented Jun 6, 2018

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adohe, yue9944882

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

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

3 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 64882, 64692, 64389, 60626, 64840). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 8a1e830 into kubernetes:master Jun 20, 2018
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. kind/bug Categorizes issue or PR as related to a bug. 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. sig/cli Categorizes an issue or PR as relevant to SIG CLI. 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.

Missing nodes in output of "kubectl top nodes"
6 participants