When using CODER_MEMORY, OOM kills don't terminate the outer container.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 73
- Forks
- 22
- Merge medio
- 9 h 44 min
- PR fusionados (30 d)
- 2
Descripción
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 dockerkeeps 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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con examples/templates/kubernetes-envbox/main.tf y sigue el punto de entrada docker /envbox donde se gestiona CODER_MEMORY. Reproduce un OOM en el pod interno y observa el contenedor externo; se considera terminado cuando el proceso /envbox externo y el pod terminan al eliminarse el workload interno.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, go, kubernetes
- Área
- devops, infrastructure
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100