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

"Start Script" starts after a job is finished

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • slave-setup-plugin
    • Ubuntu 16.04 x64
      /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
      jenkins via apt-get
      libvirt-slave 1.8.5
      slave-setup 1.10

      Setup is a node from Libvirt-plugin. This node is configured as seen in the graphic below.

      What is not working:

      1. incomming Job for node with Lable L_Ub1604 (Xen image for Ubuntu 1604 Guest)
      2. Node is starting after a while
      3. Installed slave (run as a service) is connecting
      4. Job is executed successfully on the node
      5. After job the Script mentioned under "Start Script" is executed
      6. Afterwards or the same time the other script "Stop Script" is executed twice

      The Error is that according to my assumption the "Start Script" should have been executed before the node is powered up. So step 5 should follow sep 1. I'm new to this, so maybe there is a mistake on my side.

      EDIT:

      I've written script output to a logfile. According to this the Stopscript runs twice.

      Logfile:

       [2017-11-24_12-58-25.928578822] copyDummyStart.sh (Disconnecting computer xml1604)
       [2017-11-24_12-59-27.644064994] copyDummyStop.sh
       [2017-11-24_12-59-27.653089703] copyDummyStop.sh

       

      Jenkins output:

       

      Nov 24, 2017 12:57:25 PM hudson.slaves.RetentionStrategy$Demand check
       INFO: Launching computer xml1604 as it has been in demand for 2 min 21 sec
       Nov 24, 2017 12:58:04 PM hudson.TcpSlaveAgentListener$ConnectionHandler run
       INFO: Accepted JNLP4-connect connection #4 from /192.168.5.109:38584
       Nov 24, 2017 12:58:04 PM jenkins.slaves.DefaultJnlpSlaveReceiver afterProperties
       INFO: Connecting xml1604 as a JNLP agent where the launcher class hudson.plugins.libvirt.VirtualMachineLauncher does not mark itself correctly as being a JNLP agent
       Nov 24, 2017 12:58:07 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
       INFO: JobXml1604 #24 completed: SUCCESS
      ...
      Nov 24, 2017 12:59:25 PM hudson.slaves.RetentionStrategy$Demand check
       INFO: Disconnecting computer xml1604 as it has been idle for 1 min 17 sec
       Nov 24, 2017 12:59:25 PM hudson.plugins.libvirt.VirtualMachineSlaveComputer disconnect
       INFO: Virtual machine "xml1604" (slave "xml1604") is to be shut down. reason: Offline because computer was idle; it will be relaunched when needed. (hudson.slaves.OfflineCause$IdleOfflineCause)
       method: destroy
      

       

      Pipline job

      pipeline {
          agent any
      
          stages {
              stage('Info') {
                  agent {label 'L_Ub1604'}
                  steps {
                      sh 'uname -a'
                      sh 'hostname'
                  }
              }
          }
      }

       Snapshot from node-configuration machine xml1604

       

       

            peppe Giuseppe Landolfi
            cutton_eye Tim Xen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: