kubernetes/plugin/pkg/scheduler
Kubernetes Submit Queue 5d3aae0192
Merge pull request #56083 from yguo0905/sched-log
Automatic merge from submit-queue (batch tested with PRs 56128, 56004, 56083, 55833, 56042). 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>.

Suppress the warning when a pod in binding cannot be expired

**What this PR does / why we need it**:

I have a scheduler extender, which implements the `Bind` call and takes several minutes to respond to that call. The scheduler log was full of the following error.

```
W1120 10:23:09.691188   99720 cache.go:442] Couldn't expire cache for pod default/xxx. Binding is still in progress.
```

The TTL for a pod to be expired in the scheduler cache is 30 seconds. But it's also possible that the binding (which is done asynchronously) can take longer than 30 seconds.
2cbb07a439/plugin/pkg/scheduler/factory/factory.go (L143)

The go routine that checks whether a pod has been expired is triggered every second.
2cbb07a439/plugin/pkg/scheduler/schedulercache/cache.go (L33)

So, it will print the the following warning every seconds until the pod gets expired.
2cbb07a439/plugin/pkg/scheduler/schedulercache/cache.go (L442-L443)

I think it's a valid for the binding to take more than one second, so we should downgrade this to an info to avoid polluting the scheduler log.

**Release note**:
```release-note
None
```

/sig scheduling
/assign @bsalamat 
/cc @vishh
2017-11-21 17:04:56 -08:00
..
algorithm Merge pull request #55933 from bsalamat/starvation3 2017-11-21 15:04:28 -08:00
algorithmprovider Merge pull request #51192 from guangxuli/scheduler_priority_functions_map_reduce 2017-11-19 05:22:23 -08:00
api Enforce use of fixed size int types in the API 2017-11-13 11:28:59 -08:00
core Autogenerated files 2017-11-20 22:17:06 -08:00
factory fixup! Add logic to account for pods nominated to run on nodes, but are not running yet. Add tests for the new logic. 2017-11-20 22:17:06 -08:00
metrics update BUILD files 2017-10-15 18:18:13 -07:00
schedulercache Suppress warning when a pod in binding cannot be expired 2017-11-20 16:16:42 -08:00
testing Autogenerated files 2017-10-20 23:22:03 -07:00
util Autogenerated files 2017-11-19 11:32:14 -08:00
BUILD Autogenerated files 2017-11-19 11:32:14 -08:00
OWNERS Updated OWNERS_ALIASES for scheduler, and added scheduler integration test owners. 2017-07-01 09:28:52 +08:00
scheduler.go fixup! Add logic to account for pods nominated to run on nodes, but are not running yet. Add tests for the new logic. 2017-11-20 22:17:06 -08:00
scheduler_test.go Add logic to account for pods nominated to run on nodes, but are not running yet. 2017-11-20 22:17:05 -08:00
testutil.go Enforce use of fixed size int types in the API 2017-11-13 11:28:59 -08:00