Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue 8e03228c1a
Merge pull request #64643 from dashpole/memcg_poll
Automatic merge from submit-queue (batch tested with PRs 64503, 64903, 64643, 64987). 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>.

Use unix.EpollWait to determine when memcg events are available to be Read

**What this PR does / why we need it**:
This fixes a file descriptor leak introduced in https://github.com/kubernetes/kubernetes/pull/60531 when the `--experimental-kernel-memcg-notification` kubelet flag is enabled.  The root of the issue is that `unix.Read` blocks indefinitely when reading from an event file descriptor and there is nothing to read.  Since we refresh the memcg notifications, these reads accumulate until the memcg threshold is crossed, at which time all reads complete.  However, if the node never comes under memory pressure, the node can run out of file descriptors.

This PR changes the eviction manager to use `unix.EpollWait` to wait, with a 10 second timeout, for events to be available on the eventfd.  We only read from the eventfd when there is an event available to be read, preventing an accumulation of `unix.Read` threads, and allowing the event file descriptors to be reclaimed by the kernel.

This PR also breaks the creation, and updating of the memcg threshold into separate portions, and performs creation before starting the periodic synchronize calls.  It also moves the logic of configuring memory thresholds into memory_threshold_notifier into a separate file.

This also reverts https://github.com/kubernetes/kubernetes/pull/64582, as the underlying leak that caused us to disable it for testing is fixed here.

Fixes #62808

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

/sig node
/kind bug
/priority critical-urgent
2018-06-11 17:29:19 -07:00
.github housekeeping: improved language used in ISSUE_TEMPLATE.md 2018-06-05 20:14:27 +10:00
api Run make update 2018-06-06 00:12:40 +02:00
build Adds a crictl package for kubeadm installs 2018-06-07 10:04:03 -04:00
cluster Merge pull request #64643 from dashpole/memcg_poll 2018-06-11 17:29:19 -07:00
cmd fix-kubeadm-pull-log 2018-06-11 16:07:30 +02:00
docs autogenerated 2018-06-06 23:41:10 +03:00
Godeps Merge pull request #64800 from dashpole/cadvisor_godep 2018-06-06 01:24:26 -07:00
hack Merge pull request #64708 from chuckha/v1alpha1-fix 2018-06-05 14:31:12 -07:00
logo
pkg Merge pull request #64643 from dashpole/memcg_poll 2018-06-11 17:29:19 -07:00
plugin Run make update 2018-06-06 00:12:40 +02:00
staging fix field removal in mutating admission webhooks 2018-06-11 12:22:31 +03:00
test Merge pull request #63780 from pohly/csi-e2e-parameters 2018-06-08 11:26:09 -07:00
third_party
translations
vendor Merge pull request #64800 from dashpole/cadvisor_godep 2018-06-06 01:24:26 -07:00
.bazelrc
.generated_files
.gitattributes
.gitignore
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md
CHANGELOG-1.3.md
CHANGELOG-1.4.md
CHANGELOG-1.5.md
CHANGELOG-1.6.md
CHANGELOG-1.7.md
CHANGELOG-1.8.md
CHANGELOG-1.9.md Update CHANGELOG-1.9.md for v1.9.8. 2018-05-21 19:58:50 +00:00
CHANGELOG-1.10.md Update CHANGELOG-1.10.md for v1.10.4. 2018-06-06 09:36:46 +00:00
CHANGELOG-1.11.md Update CHANGELOG-1.11.md for v1.11.0-beta.2. 2018-06-07 16:50:30 +00:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES Remove myself from sig-cli OWNER alias 2018-06-06 17:03:15 +02:00
README.md
SECURITY_CONTACTS add PST to main SECURITY_CONTACTS as formality 2018-05-24 10:52:33 -04:00
SUPPORT.md
WORKSPACE

Kubernetes

Submit Queue Widget GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
You have a working Docker environment.
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics