In a customer issue it was hard to diagnose that a child process in a Jenkins slave running on OpenShift was killed by the OOM killer. The following items would have helped: 1) Jenkins Kubernetes plugin should cleanly terminate the slave agent when it's done, rather than delete its pod. This would enable Reason: OOMKilled to be seen on the pod status, as well as giving a chance for a meaningful exit code to be set. 2) The Jenkins Kubernetes plugin should look for Reason: OOMKilled on the pod status after slave agent exits, and clearly log if it is seen. 3) It should be possible to disable automatic pod deletion for debugging purposes, allowing slave logs to be recovered and the pod status to be investigated.
https://issues.jenkins-ci.org/browse/JENKINS-48149
Added to list of cards to consider for 3.10, not committed.
Proposed for 3.11, didn't make 3.10
Trello Card: https://trello.com/c/mQ2LO7pl/1429-5-jenkins-slave-pod-debug-evg-jenkinsintegration
Released in 3.11