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

Jenkinsfile node() command ignores maxConcurrentPerNode

XMLWordPrintable

      This is roughly the Jenkinsfile of our pipeline build:

      properties([
              buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
              [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 1, maxConcurrentTotal: 4, paramsToUseForLimit: '', throttleEnabled: true, throttleOption: 'project'],
              pipelineTriggers([])
      ])
      
      node('ff') {
      }
      

      Note, that maxConcurrentPerNode is 1. "ff" is a node group, not the name of a single node.
      This morning I found two builds for the same job started at the same time on the same node:

      #34: 08:21:35 Running on jenkins04 in /var/lib/jenkins/workspace/r-Framework-Pipeline_master-ANZFTZAHSF7Z3GZCE4P4EWA2KLDAN62QSMCCUDZ4BRCFVS5MIHAA
      #35: 08:21:35 Running on jenkins04 in /var/lib/jenkins/workspace/r-Framework-Pipeline_master-ANZFTZAHSF7Z3GZCE4P4EWA2KLDAN62QSMCCUDZ4BRCFVS5MIHAA@2
      

      You see nicely by the @ sign in the workspace path that both builds indeed started on the same node.

            Unassigned Unassigned
            ewirch Eduard Wirch
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: