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

Fix upgrade issue from 1.6 to 1.7 when PreferredDuringSchedulingIgnoredDuringExecution pod anti affinity is used without topology key. #49735

Conversation

aveshagarwal
Copy link
Member

What this PR does / why we need it:
Fixes issue: #49492
The upgrade issue happens when using anti affinity in pod spec field or in annotations.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Fixes : #49492

Special notes for your reviewer:

Release note:

@kubernetes/sig-scheduling-bugs @davidopp @bsalamat

…edDuringExecution

pod anti affinity is used without topology key.

Fixes issue: kubernetes#49492
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 27, 2017
@aveshagarwal
Copy link
Member Author

@derekwaynecarr

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aveshagarwal
We suggest the following additional approver: smarterclayton

Assign the PR to them by writing /assign @smarterclayton in a comment when ready.

Associated issue: 49492

The full list of commands accepted by this bot can be found here.

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
Copy link

This PR is not for the master branch but does not have the cherrypick-approved label. Adding the do-not-merge label.

@k8s-github-robot k8s-github-robot added do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Jul 27, 2017
@aveshagarwal
Copy link
Member Author

This code is already removed from master branch as part of affinity in annotation clean up.

@davidopp
Copy link
Member

cc/ @wojtek-t @bsalamat

@davidopp
Copy link
Member

@aveshagarwal Sorry I'm still a little confused. I thought we do not handle empty TopologyKey in the scheduler anymore. So why is it safe to remove this check?

@aveshagarwal
Copy link
Member Author

@davidopp I think the confusion is that in kubernetes master branch (1.8), the behavior has been reverted to what we had in 1.6 in this PR (#47869) that means in 1.8, we again allow empty topology key for soft pod anti-affinity (https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2486).

Anyway if the goal is to not allow empty topology key for all 4 pod affinities, then I think we can close this PR and the issue saying this is working as expected. And I can send a PR to fix 1.8 to avoid regressing 1.8.

@bsalamat
Copy link
Member

bsalamat commented Aug 1, 2017

@aveshagarwal My understanding is that #47869 was not meant to be the final implementation. It was just a PR to cleanup the old logic with the plan that we will add the code to disallow empty TopologyKey.

@aveshagarwal
Copy link
Member Author

@bsalamat I am closing this and I have sent #49976 to achieve the same behavior as in 1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. kind/bug Categorizes issue or PR as related to a bug. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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.

7 participants