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

HudsonComputerListener not scheduling jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • startup-trigger-plugin
    • None
    • Jenkins 2.431
      startup-trigger-plugin 2.9.4

      I have 2 Jenkins instances where I want to trigger a job on startup of the master node. The log files of both instances indicate taht the HudsonComputerListener ist triggered an have

      "Scanning jobs for node master"

      in the log file.
      One instance is Scheduling the expected job, the other is not. I tried to find a difference by executing a script via script console to check for all conditions that I found in the source code but to no avail.

      Ist there anything other that influences the scheduling of jobs that I have missed?

      The script

      println Jenkins.instance.getLabel("master")
      Jenkins.instance.getAllItems(Job.class).each{
          if (it instanceof ParameterizedJobMixIn.ParameterizedJob) {
              ParameterizedJobMixIn.ParameterizedJob<?, ?> pJob = (ParameterizedJobMixIn.ParameterizedJob<?, ?>) it;
                pJob.getTriggers().values().each{
                  if (it instanceof org.jvnet.hudson.plugins.triggers.startup.HudsonStartupTrigger) {
                      println pJob.name + " - " + pJob.class + " - " + it.getRunOnChoice() + " - " + it.getLabel() + " - " + pJob.isBuildable()
                  }
                }
          }
      } 

      results in

      SeedJob - class hudson.model.FreeStyleProject - ON_CONNECT - master - true 

      on both instances.

            ejpenney Emory Penney
            thorndike Armin Rauch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: