mirror of https://github.com/k3s-io/k3s
![]() 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. |
||
---|---|---|
.. | ||
conformance | ||
e2e | ||
e2e_node | ||
fixtures | ||
images | ||
integration | ||
kubemark | ||
list | ||
soak | ||
typecheck | ||
utils | ||
BUILD | ||
OWNERS | ||
test_owners.csv | ||
test_owners.json |