mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
drivers: OOM kill logging for Docker driver (#17518)
Explicit error log of the docker ID and container image name
This commit is contained in:
@@ -246,6 +246,13 @@ func (h *taskHandle) run() {
|
||||
if ierr != nil {
|
||||
h.logger.Error("failed to inspect container", "error", ierr)
|
||||
} else if container.State.OOMKilled {
|
||||
h.logger.Error("OOM Killed",
|
||||
"container_id", h.containerID,
|
||||
"container_image", h.containerImage,
|
||||
"nomad_job_name", h.task.JobName,
|
||||
"nomad_task_name", h.task.Name,
|
||||
"nomad_alloc_id", h.task.AllocID)
|
||||
|
||||
// Note that with cgroups.v2 the cgroup OOM killer is not
|
||||
// observed by docker container status. But we can't test the
|
||||
// exit code, as 137 is used for any SIGKILL
|
||||
|
||||
Reference in New Issue
Block a user