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

taint fields: timeAdded not set #42394

Closed
justinsb opened this issue Mar 2, 2017 · 21 comments
Closed

taint fields: timeAdded not set #42394

justinsb opened this issue Mar 2, 2017 · 21 comments
Assignees
Labels
area/kubelet kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Milestone

Comments

@justinsb
Copy link
Member

justinsb commented Mar 2, 2017

I set taints on a node using the kubelet, but the timeAdded field was not set:

 taints:
  - effect: NoSchedule
    key: dedicated
    timeAdded: null
    value: master

In addition, I think we prefer to omit null fields.

@justinsb justinsb added this to the v1.6 milestone Mar 2, 2017
@justinsb justinsb added the kind/bug Categorizes issue or PR as related to a bug. label Mar 2, 2017
@liggitt liggitt added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Mar 13, 2017
@liggitt
Copy link
Member

liggitt commented Mar 13, 2017

doc for that field says it is only written for NoExecute taints, and that field is omitempty

@liggitt
Copy link
Member

liggitt commented Mar 13, 2017

ah, looks like omitempty will only work if timeAdded is a pointer

@liggitt
Copy link
Member

liggitt commented Mar 13, 2017

opened speculative PR in #43016 to change it to a pointer (like other optional time fields like deletionTimestamp)

@timothysc
Copy link
Member

/cc @kubernetes/sig-scheduling-bugs

@liggitt
Copy link
Member

liggitt commented Mar 13, 2017

@davidopp what component is supposed to set timeAdded for NoExecute taints (and is validation supposed to prevent it for taints with effects other than NoExecute)? The only place I see it getting set is by the node controller

@davidopp
Copy link
Member

As @liggitt alluded to, strictly speaking timeAdded is only needed for taints of effect NoExecute. The field is needed in order to make tolerationSeconds work in the face of component failure -- whichever component enforces the taint will evict the pod if timeAdded + pod.tolerationSeconds <= time.Now. (Yes, clock skew will break this if they are different components.) So only the components that add NoExecute taints (which is only NodeController) set timeAdded, and only for NoExecute taints.

#40586 was filed with the suggestion to add it for all taints. It's not strictly necessary, but since the field is user-visible (despite being purely an "internal" concept), it would probably be less confusing if we were consistent and set timeAdded for all taint types.

For 1.6 I think the current behavior is fine.

These comments are unrelated to #43016, they are just about whether/when we should be setting timeAdded.

Let me know if this is unclear.

@aveshagarwal
Copy link
Member

Other components where taints can be added are: kubelet (-register-with-taints) and kubectl taints. Right now, taint controller enforces pod eviction for NoExecute taints.

@aveshagarwal
Copy link
Member

Another component is node controller that adds taints for node problems (unreachable, notready) but clock skew is not an issue here, but only for kubelet, kubectl taint I think.

@liggitt
Copy link
Member

liggitt commented Mar 13, 2017

If the switch to a pointer won't change the values servers will accept, then current behavior seems ok for 1.6 (for JSON, we'll need to handle null even when the value is a pointer, so that'll be fine... I'm less sure about protobuf)

@ethernetdan
Copy link
Contributor

@davidopp @aveshagarwal @liggitt should this be blocking for 1.6?

@davidopp
Copy link
Member

There are two issues here. One is just a dup of #40586. The main question is whether #43016 is blocking for 1.6. I don't know enough about the API stuff to know for sure.

@liggitt
Copy link
Member

liggitt commented Mar 15, 2017

@smarterclayton says proto always tolerates missing objects, so I think #43016 is ok to move to 1.7

@k82cn
Copy link
Member

k82cn commented Jun 6, 2017

The PR was moved to 1.8, should we also move this issue to 1.8?

@k82cn
Copy link
Member

k82cn commented Sep 7, 2017

/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Sep 7, 2017
@spiffxp
Copy link
Member

spiffxp commented Sep 18, 2017

friendly v1.8 release ping, does this issue need to be in the v1.8 milestone? is this issue actively being worked?

it looks like #43016 which partially fixes this issue has been moved to v1.9

@liggitt liggitt modified the milestones: v1.8, v1.9 Sep 18, 2017
@liggitt
Copy link
Member

liggitt commented Sep 18, 2017

no, moving to 1.9

k8s-github-robot pushed a commit that referenced this issue Sep 23, 2017
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of #42394
sttts pushed a commit to sttts/api that referenced this issue Sep 23, 2017
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of kubernetes/kubernetes#42394

Kubernetes-commit: 1c0f22ea0194ba068abd34f7ca5df22af646e90e
@k82cn
Copy link
Member

k82cn commented Oct 9, 2017

/status approved-for-milestone

We'd like to get this fixed in 1.9.

@k8s-ci-robot
Copy link
Contributor

You must be a member of the @kubernetes/kubernetes-milestone-maintainers github team to add status labels.

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Issue Current

@davidopp @justinsb

Issue Labels
  • sig/scheduling: Issue will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the issue owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/bug: Fixes a bug discovered during the current release.
Help

sttts pushed a commit to sttts/api that referenced this issue Oct 13, 2017
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of kubernetes/kubernetes#42394

Kubernetes-commit: 1c0f22ea0194ba068abd34f7ca5df22af646e90e
sttts pushed a commit to sttts/api that referenced this issue Oct 14, 2017
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of kubernetes/kubernetes#42394

Kubernetes-commit: 1c0f22ea0194ba068abd34f7ca5df22af646e90e
sttts pushed a commit to sttts/api that referenced this issue Oct 16, 2017
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of kubernetes/kubernetes#42394

Kubernetes-commit: 1c0f22ea0194ba068abd34f7ca5df22af646e90e
@dims
Copy link
Member

dims commented Nov 15, 2017

@k82cn @justinsb move to 1.10?

@k82cn
Copy link
Member

k82cn commented Nov 16, 2017

Fixed by #43016.

@k82cn k82cn closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
None yet
Development

Successfully merging a pull request may close this issue.