Namespace configured for agent is different than the one defined for the Kubernetes cloud.

Issue

  • After upgrading to 2.150.2.3, agents configured to be deployed on a specific namespace don’t work, if the namespace configured for the agent is different than the one defined for the Kubernetes cloud (the client).

For example:

2019-01-30 14:10:02.461+0000 [id=30237] WARNING c.c.j.p.k.ListenableKubernetesLauncher#launch: Error in provisioning; 
agent=KubernetesSlave name: jenkins-slave-xxxx-xxxx, 
template=PodTemplate{, 
   name='jenkins-slave-xxxx', 
   namespace='cje-slaves-example-namespace', 
   label='mypod-XXXXXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXXXXXX', 
   containers=[
       ContainerTemplate{name='maven', image='maven:3.3.9-jdk-8-alpine', workingDir='/home/jenkins', command='cat', ttyEnabled=true}, 
       ContainerTemplate{name='golang', image='golang:1.8.0', workingDir='/home/jenkins', command='cat', ttyEnabled=true}
       ]
   }
java.lang.NullPointerException
   at com.cloudbees.jenkins.plugins.kube.AllContainersRunningPodWatcher.areAllContainersRunning(AllContainersRunningPodWatcher.java:61)
   at com.cloudbees.jenkins.plugins.kube.AllContainersRunningPodWatcher.periodicAwait(AllContainersRunningPodWatcher.java:114)
   at com.cloudbees.jenkins.plugins.kube.AllContainersRunningPodWatcher.await(AllContainersRunningPodWatcher.java:94)
   at com.cloudbees.jenkins.plugins.kube.ListenableKubernetesLauncher.launch(ListenableKubernetesLauncher.java:150)
   at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294)
   at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46
   at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorSe
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
   at java.lang.Thread.run(Thread.java:748)

Environment

Resolution

The issue has been fixed in kube-agent-management plugin 1.1.6.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.