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

builds triggered remotely do not run concurrently

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Incomplete
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      This setup consists of master and secondary job

      Master job is setup using 'Active Choices Parameter' to choose a host as parameter. It also lists maven artifact versions to pass the artifact as a parameter to secondary job as well.

      The build step is to 'execute shell' which executes the secondary job remotely with a curl command

      e.g.

      for i in $(echo $HOSTS | sed -e 's/,/ /g'); do
      /usr/bin/curl --data-urlencode "HOST=$i" --data-urlencode "BUILD_URL=${BUILD_URL}" ${JENKINS_URL}job/testing_deploy/buildWithParameters?token=

      {job token}

      done

      The secondary job takes those parameters and runs an ssh command for the host that was passed

      e.g.

      ssh -o RequestTTY=force

      {user}

      @${HOST} <<EOF
      set -xe
      service jboss-as-standalone stop
      mkdir -p /tmp/${JOB_NAME}/${BUILD_NUMBER}
      cd /tmp/${JOB_NAME}/${BUILD_NUMBER}
      wget -O st.ear $BUILD_URL
      chown -v jboss:jboss /tmp/${JOB_NAME}/${BUILD_NUMBER}/

      {artifact id}
      mv -vf /tmp/${JOB_NAME}/${BUILD_NUMBER}/{artifact id}

      /usr/share/jbossas/standalone/deployments/

      {artifact id}

      service jboss-as-standalone start
      exit 0
      EOF

      So the goal is on the master job we can multi select hostnames. If two hostnames are selected from one master job it fires two secondary jobs. This works great. The only issue is that when the secondary jobs are triggered they run serially instead of in parallel.

      The secondary job is setup to use throttle concurrent build plugin

      Max Total concurrent builds = 8
      Max total per node = 2

      We have 4 slaves running, with two executors. So 8 builds should be able to run at once, with two per node. This works on other projects we have but not this.

      It seems if builds have different parameters they are not honoring throttle concurrent builds parameters.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Could you please provide the configurations of your jobs? For me it seems that something is misconfigured

          Show
          oleg_nenashev Oleg Nenashev added a comment - Could you please provide the configurations of your jobs? For me it seems that something is misconfigured
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          There is not enough info to analyze the behavior. An attempt to reproduce the issue using available pieces didn't help. If you can provide job configurations, please reopen the issue.

          Show
          oleg_nenashev Oleg Nenashev added a comment - There is not enough info to analyze the behavior. An attempt to reproduce the issue using available pieces didn't help. If you can provide job configurations, please reopen the issue.

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              phxazusa1 Matt Evans
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: