-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Keep backward compatibility for 'node.Spec.Unschedulable'. #68984
Conversation
/kind bug |
@k82cn: The provided milestone is not valid for this repository. Milestones in this repository: [ Use In response to this:
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. |
/milestone v1.12 |
@@ -1470,7 +1470,15 @@ func CheckNodeUnschedulablePredicate(pod *v1.Pod, meta algorithm.PredicateMetada | |||
return false, []algorithm.PredicateFailureReason{ErrNodeUnknownCondition}, nil | |||
} | |||
|
|||
if nodeInfo.Node().Spec.Unschedulable { | |||
// If pod tolerate unschedulable taint, it's also tolerate node.Spec.Unschedulable. | |||
unschedulable := !v1helper.TolerationsTolerateTaint(pod.Spec.Tolerations, &v1.Taint{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the var name makes this hard to follow, as does combining info about the node and info about the pod into a single variable below. would something like this be clearer?
podToleratesUnschedulable := v1helper.TolerationsTolerateTaint(...)`
if nodeInfo.Node().Spec.Unschedulable && !podToleratesUnschedulable {
return false, []algorithm.PredicateFailureReason{ErrNodeUnschedulable}, nil
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Key: algorithm.TaintNodeUnschedulable, | ||
Effect: v1.TaintEffectNoSchedule, | ||
}) | ||
// TODO (k82cn): deprecates `node.Spec.Unschedulable` in 1.13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's unclear what is being deprecated here, or what action should be taken in 1.13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update related doc to depreciate it.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given all of the conversation in #68899 and the nature of the problem here, I think this needs a better commit message still and might even deserve a release note under "Known Issues" or SIGs Scheduling/Node to at least remind operators what's changed here and the taints and tolerations they need to be considering across updates in this version range.
There's info in the description; no behaviour changed, so no release note here. |
So you're saying there's definitely absolutely no way this issue is user visible with respect to cluster operator's existing configs or in their cluster users' pod specs? If so, that feels like an argument this is not release blocking and is just an artifact of a stale test case. Yet you're only touching pkg/scheduler in this PR and not the test case. This doesn't match up. Plus we do have a bunch of "fixes issue where..." type release notes. It seems to me this would be totally appropriate: "Fixes issue #68899 where pod might schedule on an incorrectly tainted node. Future note: node.Spec.Unschedulable will be deprecated in 1.13 as per issue #XXXXXX." Ie: you should open an issue now for milestone 1.13 for this deprecation. |
Such kind of release node is ok to me. |
will |
OK then we need confirmation this follows deprecation policy which I'm not sure is actually true, the relnote wording specified below, a decision on whether to put this is the Node or Scheduling notes section, and the deprecation issue opened against 1.13. Possible relnote:
|
The api field will definitely not be removed from the v1 api. It's not entirely clear to me what behavior can be deprecated in v1. If a client stops setting it and just tries to set the taint, the controller will remove the taint automatically, right? If kubectl wanted to begin simultaneously setting the unscheduleable field and taint in cordon (and removing them both in uncordon), that could maybe be ok, but would need to think about that a little more. |
I really want to see this PR finished off today so we get final confirmation on long running tests over the coming days head of 1.12. This is an important compatibility issue to resolve thoroughly. |
...and this is the only PR I'm holding the 1.12 release on at this point. |
looks like anyone can LGTM this at this point. are further changes required here? |
/hold |
Chatting with @bsalamat it seems I've misread the intent here. Clarifying based on that:
|
Thanks, @tpepper. Looks good to me, however, we can deprecate Node.Spec.Unschedulable only when our replacement (TaintNodeByCondition) is GA'ed. If that happens in 1.13 (which I doubt), we can deprecate Node.Spec.Unschedulable in 1.13. If not, we must wait for TaintNodeByCondition to be promoted to GA and then deprecate Node.Spec.Unschedulable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, k82cn 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 |
/hold cancel |
Eventually, Yes; but we need to follow deprecation policy to do that.
Agree, we need to think about it more; we can follow up this in #69010 . |
for _, test := range testCases { | ||
nodeInfo := schedulercache.NewNodeInfo() | ||
nodeInfo.SetNode(test.node) | ||
fit, _, err := CheckNodeUnschedulablePredicate(test.pod, nil, nodeInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like the CheckNodeUnschedulablePredicate() has no callers at all, can you confirm about that?
if so, do we still need to update this func?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it by RegisterMandatoryFitPredicate
in this PR.
It's a bit unclear to me what "deprecation of the field" means here. We cannot remove the field from the api, so will it become a no-op a year from now? I don't think kubernete's deprecation policy explicitly states what to do in this case. |
According to deprecation policy, "API elements may only be removed by incrementing the version of the API group.". For now, we only need to highlight |
Signed-off-by: Da K. Ma klaus1982.cn@gmail.com
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 #68899
Release note: