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

Expose node status so that external preemption plugins can use it #98129

Merged
merged 2 commits into from Feb 2, 2021

Conversation

chendave
Copy link
Member

What type of PR is this?

Add one of the following kinds:
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
This is following up the comments from here: #97184 (comment)
Does this PR introduce a user-facing change?:


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 18, 2021
@k8s-ci-robot
Copy link
Contributor

@chendave: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jan 18, 2021
@chendave
Copy link
Member Author

/release-note none

@chendave
Copy link
Member Author

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 18, 2021
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 18, 2021
@chendave
Copy link
Member Author

/sig scheduling

@k8s-ci-robot
Copy link
Contributor

@chendave: The label(s) sig/ cannot be applied, because the repository doesn't have them

In response to this:

/sig scheduling

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.

@chendave
Copy link
Member Author

@adtac thanks for the review!

@chendave
Copy link
Member Author

/cc @ahg-g

return "", err
}
if len(candidates) == 0 {
return "", &framework.FitError{
Copy link
Member

Choose a reason for hiding this comment

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

It's not clear to me that how this returned obj is utilized by subsequent PostFilter plugins.

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR intends to change the public method of FindCandidates to return node status, so that the calling of this method could get the node status as well.

Quote from @ahg-g 's initial comments,

This is just so external preemption plugins that use this interface can benefit from this info, but this is less critical for this PR, so I guess we can leave this here for now.

As to the return FitError here, it's used to populate the log message on the preemption failure. I did some refactoring to move this obj from line 224 to here, the reason is I need to add the unschedulableNodeStatus into the status or else user might confuse that they have for example they have 3 nodes in the cluster, but only give hint on one node that doesn't have enough resource but no idea on what's happening on other two nodes (please see my update on the testcases).

In short, it is sill used by log population.

Copy link
Member

Choose a reason for hiding this comment

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

so that the calling of this method could get the node status as well.

Well, the current version is not stateless so arguably I doubt if users would like to use it... But I see your point.

Signed-off-by: Dave Chen <dave.chen@arm.com>
@chendave
Copy link
Member Author

rebased and comments has been addressed.
@Huang-Wei could you please take another look?

@Huang-Wei
Copy link
Member

@chendave LGTM. Could you squash the commits?

Signed-off-by: Dave Chen <dave.chen@arm.com>
@chendave
Copy link
Member Author

chendave commented Feb 1, 2021

@chendave LGTM. Could you squash the commits?

Squashed commits into 2.
@Huang-Wei , I feel we can keep two commits in this PR, 1) Expose node status 2) Add UnschedulableAndUnresolvable node into final node status.
please let me know your thoughts?

@chendave
Copy link
Member Author

chendave commented Feb 1, 2021

/retest

@Huang-Wei
Copy link
Member

/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 Feb 1, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chendave, Huang-Wei

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 1, 2021
@chendave
Copy link
Member Author

chendave commented Feb 2, 2021

/retest

@k8s-ci-robot k8s-ci-robot merged commit ba85bfe into kubernetes:master Feb 2, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 2, 2021
@chendave chendave deleted the expose_status branch February 2, 2021 05:24
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants