• 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.

          [JENKINS-72329] HudsonComputerListener not scheduling jobs

          Armin Rauch added a comment -

          After a few more hours of trial and error I found a workaroud to leave "Restricted node Label" empty instead of using "master". As far as I understand the source, the empty node Label defaults to "master". The question remains what ist the difference between "master" and "master".

          Armin Rauch added a comment - After a few more hours of trial and error I found a workaroud to leave "Restricted node Label" empty instead of using "master". As far as I understand the source, the empty node Label defaults to "master". The question remains what ist the difference between "master" and "master".

          Reid added a comment -

          thorndike is it possible that the retiring of the label "master" is part of the problem?  The label is now "built-in".

          https://community.jenkins.io/t/jenkins-2-319-1-master-controller-built-in-node-built-in/939

          Reid added a comment - thorndike is it possible that the retiring of the label "master" is part of the problem?  The label is now "built-in". https://community.jenkins.io/t/jenkins-2-319-1-master-controller-built-in-node-built-in/939

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

              Created:
              Updated: