k3s/test
Kubernetes Submit Queue 3bc1a0a1d0
Merge pull request #60900 from dashpole/eviction_test_no_pressure
Automatic merge from submit-queue (batch tested with PRs 60900, 62215, 62196). 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>.

[Flaky test fix] Use memory.force_empty before and after eviction tests

**What this PR does / why we need it**:
(copied from https://github.com/kubernetes/kubernetes/pull/60720):
MemoryAllocatableEviction tests have been somewhat flaky: https://k8s-testgrid.appspot.com/sig-node-kubelet#kubelet-serial-gce-e2e&include-filter-by-regex=MemoryAllocatable
The failure on the flakes is ["Pod ran to completion"](https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-node-kubelet-serial/3785#k8sio-memoryallocatableeviction-slow-serial-disruptive-when-we-run-containers-that-should-cause-memorypressure-should-eventually-evict-all-of-the-correct-pods).
Looking at [an example log](https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-node-kubelet-serial/3785/artifacts/tmp-node-e2e-6070a774-cos-stable-63-10032-71-0/kubelet.log) (and search for memory-hog-pod, we can see that this pod fails admission because the allocatable memory threshold has already been crossed.
`eviction manager: thresholds - ignoring grace period: threshold [signal=allocatableMemory.available, quantity=250Mi] observed 242404Ki`

https://github.com/kubernetes/kubernetes/pull/60720 wasn't effective.  To clean-up after each eviction test, and prepare for the next, use memory.force_empty to make the kernel reclaim memory in the allocatable cgroup before and after eviction tests.

**Special notes for your reviewer**:
I tested to make sure this doesn't break Cgroup Manager tests.
It should work on both cgroupfs and systemd based systems, although I have only tested in on cgroupfs.

**Release note**:
```release-note
NONE
```

/assign @yujuhong @Random-Liu 
/sig node
/priority important-soon
/kind bug

its getting a little late in the release cycle, so we can probably wait until after code freeze is lifted for this.
2018-04-06 21:30:06 -07:00
..
conformance Adds daemonset conformance tests 2018-02-28 12:43:02 -08:00
e2e Merge pull request #58807 from CaoShuFeng/audit_annotation_rbac 2018-04-06 19:31:04 -07:00
e2e_node Merge pull request #60900 from dashpole/eviction_test_no_pressure 2018-04-06 21:30:06 -07:00
fixtures Make Scale() for RC poll-based until #31345 is fixed 2018-02-27 13:10:38 +01:00
images Moving test images under volumes-tester/ceph and volumes-tester/nfs 2018-04-04 15:27:30 -07:00
integration Use pause manifest image 2018-04-06 11:00:50 +05:30
kubemark Bump to etcd 3.1.12 to pick up critical fix 2018-03-09 14:28:23 -08:00
list Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
soak Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
typecheck Deduplicate identical typecheck errors between platforms. 2018-03-28 19:42:48 -07:00
utils Merge pull request #62114 from deads2k/cli-22-jobs 2018-04-06 17:06:09 -07:00
BUILD Add test/typecheck, a fast typecheck for all build platforms. 2018-02-27 13:53:32 -08:00
OWNERS Add cblecker to test/ approvers 2018-03-06 22:35:26 -08:00
test_owners.csv fix all the typos across the project 2018-02-11 11:04:14 +08:00
test_owners.json Remove all traces of federation 2017-10-26 13:37:37 -07:00