coder / coder/envbox

When using CODER_MEMORY, OOM kills don't terminate the outer container.

Offen
#161 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
73
Forks
22
Ø Merge
9 Std. 44 Min.
Gemergte PRs (30 T.)
2

Beschreibung

While testing these out, I noticed this behavioral difference.

* With a traditional pod, if the workspace tries to allocate memory beyond its limit, the pod gets OOM killed, freeing the pod's resources.
* With an envbox pod, if not using CODER_MEMORY, processes running in the inner pod aren't restricted by the pod's limits; the pod is OOM killed if it tries to allocate more memory than is available on the node.
* If using CODER_MEMORY, excessive allocation kills the inner pod, but `/envbox docker` keeps running and so the pod keeps running & reserving resources, even as the workload we actually cared about is dead.

The template I'm using is based on https://github.com/coder/coder/blob/main/examples/templates/kubernetes-envbox/main.tf ; the relevant portion of the pod definition looks like this:

```
container {
name = "dev"
image = local.envbox_image
command = ["/envbox", "docker"]

env {
name = "CODER_MEMORY"
value_from {
resource_field_ref {
resource = "limits.memory"
}
}
}
```

Possibly there is something I ought to tweak so that /envbox terminates when the inner pod does? I'm not sure if I've missed something there.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit examples/templates/kubernetes-envbox/main.tf und verfolge den /envbox docker-Einstiegspunkt, an dem CODER_MEMORY verarbeitet wird. Reproduziere einen OOM im inneren Pod und beobachte den äußeren Container; abgeschlossen ist die Aufgabe, wenn der äußere /envbox-Prozess und der Pod beendet werden, sobald der innere Workload beendet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, go, kubernetes
Bereich
devops, infrastructure
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.