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

Skip check for all topology labels when using system default spreading #105046

Merged
merged 1 commit into from Sep 16, 2021

Conversation

@alculquicondor
Copy link
Member

@alculquicondor alculquicondor commented Sep 15, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Skip check for all topology labels when using system default spreading

Checking for all topology labels is not backwards compatible. Clusters were nodes don't have zone labels effectively have default spreading disabled.

Change only applies to system defaults.

/sig scheduling

Which issue(s) this PR fixes:

Fixes #102136

Special notes for your reviewer:

This replaces #102383 (the contributor abandoned).

One thing to note is the behavior when some nodes have zones. The scoring would favor nodes with no zone. We should consider this as undefined behavior.

Does this PR introduce a user-facing change?

Fix system default topology spreading when nodes don't have zone labels. Pods correctly spread by default now.
@alculquicondor
Copy link
Member Author

@alculquicondor alculquicondor commented Sep 15, 2021

/assign @Huang-Wei

Loading

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 15, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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

Loading

@k8s-ci-robot k8s-ci-robot requested review from adtac and ahg-g Sep 15, 2021
@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 15, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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

Loading

Copy link
Member

@Huang-Wei Huang-Wei left a comment

Some nits. LGTM overall.

Loading

Loading
Loading
st.MakeNode().Name("node-a").Label(v1.LabelHostname, "node-a").Obj(),
st.MakeNode().Name("node-b").Label(v1.LabelHostname, "node-b").Obj(),
st.MakeNode().Name("node-c").Label(v1.LabelHostname, "node-c").Obj(),
st.MakeNode().Name("node-d").Label(v1.LabelHostname, "node-d").Obj(),
Copy link
Member

@Huang-Wei Huang-Wei Sep 15, 2021

Choose a reason for hiding this comment

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

For curiosity: in addition to zone label, should we consider the case that all or partial nodes don't carry standard host label?

Loading

Copy link
Member Author

@alculquicondor alculquicondor Sep 16, 2021

Choose a reason for hiding this comment

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

Is that even possible? It seems that kubelet takes care of it https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname

Interestingly, given that we special-case hostname to do the count in Score (instead of PreScore), we could make it work. However, I don't think we need to support that.

Loading

Copy link
Member

@Huang-Wei Huang-Wei Sep 16, 2021

Choose a reason for hiding this comment

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

Is that even possible?

I was just curious. Personally I'm with you to believe it's sane defaults for every cluster.

Loading

Checking for all topology labels is not backwards compatible. Clusters were nodes don't have zone labels effectively have default spreading disabled.

Change only applies to system defaults.
@Huang-Wei
Copy link
Member

@Huang-Wei Huang-Wei commented Sep 16, 2021

/retest
/lgtm

Loading

@cpanato
Copy link
Member

@cpanato cpanato commented Nov 23, 2021

/triage accepted
/priority important-soon

Loading

k8s-ci-robot added a commit that referenced this issue Nov 23, 2021
…of-#105046-upstream-release-1.22

Automated cherry pick of #105046: Skip check for all topology labels when using system default
k8s-ci-robot added a commit that referenced this issue Nov 23, 2021
…of-#105046-upstream-release-1.20

Automated cherry pick of #105046: Skip check for all topology labels when using system default
k8s-ci-robot added a commit that referenced this issue Nov 23, 2021
…of-#105046-upstream-release-1.21

Automated cherry pick of #105046: Skip check for all topology labels when using system default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment