-
Bug
-
Resolution: Duplicate
-
Minor
-
Jenkins 2.71
kubernetes-plugin: 0.12
If we use a global pod (defined within the configure Jenkins panel).
The pod will end up in a «Error» state with the jnlp in error and the others container within still running.
So this easy example:
node("slave-go"){
sleep 5
}
Where «slave-go» is a pod with 2 containers, a go container and a jnlp container.
The job will run with a success state, but the pod will fall in a Error state.
slave-go-2jl94 1/2 Error 0 6h
The log of the jnlp container seem to properly end:
... Aug 22, 2017 8:30:10 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated
But will immediately try to reconnect:
... Aug 22, 2017 8:30:20 PM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$2$1 onReconnect INFO: Restarting agent via jenkins.slaves.restarter.UnixSlaveRestarter@22f325f7 Aug 22, 2017 8:30:21 PM hudson.remoting.jnlp.Main createEngine ...
It will try all the protocols and than fail.
This is where is it interesting. If we use a podTemplate defintion, instead of a global pod definition. We will end up with a job running with sucess and a slave pod going to the proper «terminating» state.
So this example will work:
podTemplate(label: 'example_go', inheritFrom: 'slavenode', containers: [ containerTemplate(name: 'golang', image: 'somegoimage', ttyEnabled: true, alwaysPullImage: true, workingDir: '/home/jenkins/workspace', command: 'cat') ]) { node("example_go"){ container("golang"){ sleep 5 } } }
Please fix it, so that slave provided by a standard global pod definition end up in the proper state.
This was properly working with version 0.10 of the kubernetes plugin.
- duplicates
-
JENKINS-45910 Template namespace is ignored when deleting pod
-
- Resolved
-
Still even with a the workaround of feeding namespace on each pod template.
The «main» namespace should be by default the one on each pod template.