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

2 pods are started instead of 1 after update to version 1.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • kubernetes-plugin
    • None
    • Jenkins 2.85
      Kubernetes plugin 1.1 / 1.1.2

      We updated the kubernetes plugin to 1.1 and Jenkins to 2.85 yesterday.

      When you create the pod with a node block inside a podTemplate, it will create 2 pods now instead of 1. The second one seems to be create 10 seconds after the first 1 is created.

       

      debian-lfxb0-8s18k 2/2 Running 0 5s
      debian-lfxb0-d53mq 2/2 Running 0 15s

      Simplified test case

      podTemplate(
          name: "debian",
          label: "debian",
          instanceCap: 1,
      
          containers: [
              containerTemplate(
                  name: 'debian',
                  image: "debian",
                  ttyEnabled: true,
                  command: "cat"
              )
          ]
      ) {
          node("debian") {
              sleep 99999
          }
      }
      

       

      Edit: It seems to be some change in 1.1, kubernetes plugin 1.0 seems to only start one pod. 

      Jenkins log

      Dec 12, 2017 1:20:11 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
      Excess workload after pending Spot instances: 1
      Dec 12, 2017 1:20:11 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
      Template: Kubernetes Pod Template
      Dec 12, 2017 1:20:11 PM INFO okhttp3.internal.platform.Platform log
      ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
      Dec 12, 2017 1:20:11 PM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
      Started provisioning Kubernetes Pod Template from kubernetes with 1 executors. Remaining excess workload: 0
      Dec 12, 2017 1:20:21 PM INFO hudson.slaves.NodeProvisioner$2 run
      Kubernetes Pod Template provisioning successfully completed. We have now 5 computer(s)
      Dec 12, 2017 1:20:21 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
      Excess workload after pending Spot instances: 1
      Dec 12, 2017 1:20:21 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
      Template: Kubernetes Pod Template
      Dec 12, 2017 1:20:21 PM INFO okhttp3.internal.platform.Platform log
      ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
      Dec 12, 2017 1:20:21 PM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
      Started provisioning Kubernetes Pod Template from kubernetes with 1 executors. Remaining excess workload: -0.81
      Dec 12, 2017 1:20:21 PM INFO okhttp3.internal.platform.Platform log
      ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
      Dec 12, 2017 1:20:21 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
      Created Pod: debian-9z8rf-fvl9q in namespace default
      Dec 12, 2017 1:20:21 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
      Waiting for Pod to be scheduled (0/100): debian-9z8rf-fvl9q
      Dec 12, 2017 1:20:22 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run
      Accepted JNLP4-connect connection #8 from xxx.xx.x.xx/xxx.xx.x.xx:34406
      Dec 12, 2017 1:20:31 PM INFO hudson.slaves.NodeProvisioner$2 run
      Kubernetes Pod Template provisioning successfully completed. We have now 6 computer(s)
      Dec 12, 2017 1:20:31 PM INFO okhttp3.internal.platform.Platform log
      ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
      Dec 12, 2017 1:20:31 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
      Created Pod: debian-9z8rf-wlwht in namespace default
      Dec 12, 2017 1:20:31 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
      Waiting for Pod to be scheduled (0/100): debian-9z8rf-wlwht
      Dec 12, 2017 1:20:32 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run
      Accepted JNLP4-connect connection #9 from xxx.xx.x.xxx/xxx.xx.x.xxx:38066
      Dec 12, 2017 1:22:42 PM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
      Terminating Kubernetes instance for agent debian-9z8rf-wlwht
      Dec 12, 2017 1:22:42 PM WARNING jenkins.slaves.DefaultJnlpSlaveReceiver channelClosed
      Computer.threadPoolForRemoting [#52] for debian-9z8rf-wlwht terminated
      java.nio.channels.ClosedChannelException
      	at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:208)
      	at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
      	at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
      	at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
      	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
      	at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800)
      	at org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
      	at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:311)
      	at hudson.remoting.Channel.close(Channel.java:1405)
      	at hudson.remoting.Channel.close(Channel.java:1358)
      	at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:737)
      	at hudson.slaves.SlaveComputer.access$800(SlaveComputer.java:96)
      	at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:655)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      

       

       

            vlatombe Vincent Latombe
            berni_ Bernhard Kaszt
            Votes:
            5 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: