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

Remove idle executors causes index out of bounds when docker plugin creates a new cloud

XMLWordPrintable

      The removal of idle executors in Jenkins weekly releases (PR-9177) causes a Jelly expression exception message when attempting to modify a newly created Docker cloud after using the docker plugin to create a new cloud of type "Docker". The exception message is:

      Caught exception evaluating: !builtInHasExecutors and computers.get(0).node == app and computers.size()
      java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
      

      The issue is only visible with Jenkins weekly releases 2.463 and later. It is not visible with the most recent Jenkins 2.452.3 LTS or with the Jenkins 2.462.1 release candidate.

      Steps to duplicate the issue in a clean environment:

      1. Create a plugins.txt with the list of plugins to be installed
      2. Create a run-jenkins.sh script that downloads Jenkins 2.470 and the defined plugins
      3. Run the run-jenkins.sh script and complete the setup wizard by installing no additional plugins and creating a new user
      4. Configure 0 executors on the controller with "Manage Jenkins" -> "System" (this is a critical step, if this step is not performed, the error does not appear)
      5. Define and save a new cloud using "Manage Jenkins" => "Cloud" and choosing type "Docker"
      6. Open the configuration page of the newly created cloud and see the exception in the console output and in the Jenkins log from "Manage Jenkins" -> "System log"

        1. plugins.txt
          2 kB
          Mark Waite
        2. run-jenkins.sh
          0.9 kB
          Mark Waite

            mawinter69 Markus Winter
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: