kubernetes/pkg
Kubernetes Submit Queue cc1d0e2021
Merge pull request #66106 from cofyc/fix64626
Automatic merge from submit-queue (batch tested with PRs 66011, 66111, 66106, 66039, 65745). 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>.

Fix TestVolumeBinding out of sync errors

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

Invalidate `CheckVolumeBinding` predicate cache on PV update. 

CheckVolumeBinding predicate calls SchedulerVolumeBinder.FindPodVolumes which will cache PVs in PodBindingCache. When PV got updated, we should invalidate cache, otherwise PVAssumeCache.Assume will fail with out of sync error.

**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 #64626

**Special notes for your reviewer**:

When a PV is created, these operations happen asynchronously:

- [pvcontroller.1] pv controller will update PV status from empty to `Available`
- [scheduler.1] scheduler will find matching PVs and cache them in PodBindingCache in `CheckVolumeBinding` predicate
- [scheduler.2] scheduler will assume matching PVs from PodBindingCache

If [pvcontroller.1] happens between [scheduler.1] and [scheduler.2], and `CheckVolumeBinding` predicate result is cached in [scheduler.1], then scheduler will always use stale PodBindingCache in [scheduler.2] which [will cause out-of-sync error](https://github.com/kubernetes/kubernetes/blob/v1.12.0-alpha.0/pkg/controller/volume/persistentvolume/scheduler_assume_cache.go#L277) because resource version is old.

**Release note**:

```release-note
NONE
```
2018-07-12 17:57:08 -07:00
..
api dry-run: Create new options for Update/Create and pass it along 2018-07-12 07:18:37 -07:00
apis Merge pull request #66047 from krunaljain/bugfix/csi_default_fs_type 2018-07-10 18:45:32 -07:00
auth Improve multi-authorizer errors 2018-07-06 10:55:17 -04:00
capabilities Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
client clean up node expansion 2018-07-10 11:01:15 +08:00
cloudprovider Merge pull request #66007 from w-leads/bugfix/vcp-missing-vmuuid 2018-07-12 10:14:03 -07:00
controller Merge pull request #66120 from CaoShuFeng/csr_deny 2018-07-12 15:14:20 -07:00
credentialprovider Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
features Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
fieldpath fieldpath: Add tests for missing cases 2018-07-12 10:26:18 +02:00
generated Generate pkg/generated/bindata.go 2018-07-09 11:38:05 -07:00
kubeapiserver kube-apiserver: disallow --secure-port 0 2018-07-09 14:03:08 +02:00
kubectl make delete waits match on UID 2018-07-12 14:48:13 -04:00
kubelet Merge pull request #65594 from liggitt/node-csr-addresses-2 2018-07-11 22:25:07 -07:00
kubemark Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
master dry-run: Create new options for Update/Create and pass it along 2018-07-12 07:18:37 -07:00
printers Merge pull request #65351 from dtaniwaki/fix-deletion-timestamp-printing 2018-07-09 20:39:10 -07:00
probe Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
proxy Merge pull request #65425 from islinwb/ipvs_cleanup_rules 2018-07-12 15:14:16 -07:00
quota only need to ignore resources that match discovery conditions 2018-07-05 10:29:58 -04:00
registry dry-run: Create new options for Update/Create and pass it along 2018-07-12 07:18:37 -07:00
routes Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
scheduler Invalidate CheckVolumeBinding predicate cache on PV update. 2018-07-12 14:55:30 +08:00
security Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
securitycontext Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
serviceaccount fix a nit error in log 2018-06-27 14:21:27 +08:00
ssh Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
util Merge pull request #65594 from liggitt/node-csr-addresses-2 2018-07-11 22:25:07 -07:00
version Set gazelle:importmap_prefix for everything under staging/src 2018-06-22 16:22:57 -07:00
volume Merge pull request #65649 from rsc/fix-printf 2018-07-11 14:09:08 -07:00
watch/json Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
windows/service Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
.import-restrictions Add import-boss directives 2017-10-13 07:06:22 -04:00
BUILD Autogenerated stuff 2018-06-27 13:31:10 +02:00
OWNERS