Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52144

unable to provision pods w/ plugin > 1.4.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • kubernetes-plugin
    • None

      after upgrading from 1.4.1 to any new version, the latest being 1.8.4 i am unable to provision any pods in kubernetes. NOTHING has changed in my configuration, which means something is different in the plugin.

      in 1.4.1 i did NOT have to specify any working directory as part of the configuration, it is an empty value. for 1.8.4 it seems i am forced to pick a value and it defaults to /home/jenkins (ugh) if nothing is selected. i have explicitly created a /home/jenkins/.jenkins-agent directory and set the value to that, but still no luck.

      here is the pod template (from the logs) that gets created:

      Pod built: Pod(apiVersion=v1, kind=Pod, metadata=ObjectMeta(annotations={}, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, initializers=null, labels={jenkins=slave, jenkins/maven-8-debian=true}, name=maven-8-debian-s9xnf, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=PodSpec(activeDeadlineSeconds=null, affinity=null, automountServiceAccountToken=null, containers=[Container(args=[d71ba3254f49281ef132d9bd8c841dc52386c1b46c919a64e863a57912408399, maven-8-debian-s9xnf], command=[], env=[EnvVar(name=JENKINS_SECRET, value=d71ba3254f49281ef132d9bd8c841dc52386c1b46c919a64e863a57912408399, valueFrom=null, additionalProperties={}), EnvVar(name=JENKINS_NAME, value=maven-8-debian-s9xnf, valueFrom=null, additionalProperties={}), EnvVar(name=JENKINS_URL, value=http://jenkins-beta.infra.us-east-1.conductor.sh/, valueFrom=null, additionalProperties={}), EnvVar(name=HOME, value=/home/jenkins/.jenkins-agent, valueFrom=null, additionalProperties={})], envFrom=[], image=registry.battery-park.conductor.com/jenkins-slave-8-maven-debian, imagePullPolicy=Always, lifecycle=null, livenessProbe=null, name=jnlp, ports=[], readinessProbe=null, resources=ResourceRequirements(limits={}, requests={}, additionalProperties={}), securityContext=SecurityContext(capabilities=null, privileged=false, readOnlyRootFilesystem=null, runAsNonRoot=null, runAsUser=null, seLinuxOptions=null, additionalProperties={}), stdin=null, stdinOnce=null, terminationMessagePath=null, terminationMessagePolicy=null, tty=true, volumeMounts=[VolumeMount(mountPath=/home/jenkins/.jenkins-agent, name=workspace-volume, readOnly=false, subPath=null, additionalProperties={})], workingDir=/home/jenkins/.jenkins-agent, additionalProperties={})], dnsPolicy=null, hostAliases=[], hostIPC=null, hostNetwork=null, hostPID=null, hostname=null, imagePullSecrets=[], initContainers=[], nodeName=null, nodeSelector={}, restartPolicy=Never, schedulerName=null, securityContext=null, serviceAccount=null, serviceAccountName=null, subdomain=null, terminationGracePeriodSeconds=null, tolerations=[], volumes=[Volume(awsElasticBlockStore=null, azureDisk=null, azureFile=null, cephfs=null, cinder=null, configMap=null, downwardAPI=null, emptyDir=EmptyDirVolumeSource(medium=, sizeLimit=null, additionalProperties={}), fc=null, flexVolume=null, flocker=null, gcePersistentDisk=null, gitRepo=null, glusterfs=null, hostPath=null, iscsi=null, name=workspace-volume, nfs=null, persistentVolumeClaim=null, photonPersistentDisk=null, portworxVolume=null, projected=null, quobyte=null, rbd=null, scaleIO=null, secret=null, storageos=null, vsphereVolume=null, additionalProperties={})], additionalProperties={}), status=null, additionalProperties={})

      and this the resulting error i get back

      Error in provisioning; agent=KubernetesSlave name: maven-8-debian-s9xnf, template=PodTemplate{inheritFrom='', name='maven-8-debian', namespace='', label='maven-8-debian', nodeSelector='', nodeUsageMode=NORMAL, workspaceVolume=EmptyDirWorkspaceVolume [memory=false], containers=[ContainerTemplate{name='jnlp', image='registry.battery-park.conductor.com/jenkins-slave-8-maven-debian', alwaysPullImage=true, workingDir='/home/jenkins/.jenkins-agent', command='', args='${computer.jnlpmac} ${computer.name}', ttyEnabled=true, resourceRequestCpu='', resourceRequestMemory='', resourceLimitCpu='', resourceLimitMemory='', livenessProbe=org.csanchez.jenkins.plugins.kubernetes.ContainerLivenessProbe@5f5745d0}], yaml=}
      java.lang.IllegalStateException: Containers are terminated with exit codes: {jnlp=127}
      	at org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:156)
      	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      i am unable to get any details about the pod b/c it gets deleted before i can get any information about it.

            Unassigned Unassigned
            jgangemi Jae Gangemi
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: