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

Use same node which has been specified in the "Restrict where this project can be run" field

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: scripttrigger-plugin
    • Labels:
      None
    • Environment:
      rhel 5.5
      64 bits
      Jenkins 1.464
    • Similar Issues:

      Description

      Hello All,

      Execute ScriptTrigger using the same slave as was specified in the "Restrict where this project can be run" field

      For instance:

      Restrict where this project can be run: Label Expression: UBUNTU

      [ScriptTrigger] - Poll with a shell or batch script

      Polling started on 14-Jun-2012 07:00:59
      Polling for the job XXX_2.5
      Looking nodes where the poll can be run.
      Looking for a candidate node to run the poll.
      Looking for a polling node with the assigned project label ubuntu.
      Trying to poll on master node.

      Polling on master.
      The expected script execution code is 0
      Evaluating the script:

      Thanks

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/scripttrigger/AbstractTrigger.java
          src/main/java/org/jenkinsci/plugins/scripttrigger/LabelRestrictionClass.java
          src/main/java/org/jenkinsci/plugins/scripttrigger/ScriptTrigger.java
          src/main/java/org/jenkinsci/plugins/scripttrigger/groovy/GroovyScriptTrigger.java
          src/main/resources/org/jenkinsci/plugins/scripttrigger/ScriptTrigger/config.jelly
          src/main/resources/org/jenkinsci/plugins/scripttrigger/groovy/GroovyScriptTrigger/config.jelly
          http://jenkins-ci.org/commit/scripttrigger-plugin/01fdc98e0d06c9349d016bc64b0b5f25e77eb1fc
          Log:
          Fix JENKINS-14104

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/scripttrigger/AbstractTrigger.java src/main/java/org/jenkinsci/plugins/scripttrigger/LabelRestrictionClass.java src/main/java/org/jenkinsci/plugins/scripttrigger/ScriptTrigger.java src/main/java/org/jenkinsci/plugins/scripttrigger/groovy/GroovyScriptTrigger.java src/main/resources/org/jenkinsci/plugins/scripttrigger/ScriptTrigger/config.jelly src/main/resources/org/jenkinsci/plugins/scripttrigger/groovy/GroovyScriptTrigger/config.jelly http://jenkins-ci.org/commit/scripttrigger-plugin/01fdc98e0d06c9349d016bc64b0b5f25e77eb1fc Log: Fix JENKINS-14104
          Hide
          gbois Gregory Boissinot added a comment -

          Check version 0.20 with New Node restriction feature.

          Show
          gbois Gregory Boissinot added a comment - Check version 0.20 with New Node restriction feature.
          Hide
          v2v Victor Martinez added a comment -

          Hello again,

          It seems the issues is still alive.

          Plugin Version: 0.20
          Jenkins Version: 1.464
          Java Version: jdk_1.6.25 64 bits
          OS Server side: RHEL 5.5 (Tikanga)

          Pull output:
          ScriptTrigger Log

          Polling started on 19-Jun-2012 07:00:33
          Polling for the job XX_2.5
          Looking nodes where the poll can be run.
          Looking for a node to the restricted label ubuntu.
          Can't find any eligible nodes.
          Trying to poll on master node.

          Polling on master.
          The expected script execution code is 0
          Evaluating the script:

          Console output (JOB):

          [ScriptTrigger] The execution script returns the expected exit code (log)
          Building remotely on rbm-83 in workspace /storage/jenkins/XX_2.5
          Checking out a fresh workspace because /storage/jenkins/XX_2.5/scripts doesn't exist
          Cleaning local Directory scripts

          There were three slaves using the label "ubuntu" but the plugin didn't pick it up.

          Let me know if you need further info

          Thanks.

          Show
          v2v Victor Martinez added a comment - Hello again, It seems the issues is still alive. Plugin Version: 0.20 Jenkins Version: 1.464 Java Version: jdk_1.6.25 64 bits OS Server side: RHEL 5.5 (Tikanga) Pull output: ScriptTrigger Log Polling started on 19-Jun-2012 07:00:33 Polling for the job XX_2.5 Looking nodes where the poll can be run. Looking for a node to the restricted label ubuntu. Can't find any eligible nodes. Trying to poll on master node. Polling on master. The expected script execution code is 0 Evaluating the script: Console output (JOB): [ScriptTrigger] The execution script returns the expected exit code (log) Building remotely on rbm-83 in workspace /storage/jenkins/XX_2.5 Checking out a fresh workspace because /storage/jenkins/XX_2.5/scripts doesn't exist Cleaning local Directory scripts There were three slaves using the label "ubuntu" but the plugin didn't pick it up. Let me know if you need further info Thanks.
          Hide
          gbois Gregory Boissinot added a comment -

          Does the slave is offline at the poll occurs?

          Show
          gbois Gregory Boissinot added a comment - Does the slave is offline at the poll occurs?
          Hide
          gbois Gregory Boissinot added a comment -

          Victor,
          Please could you help me to fix it by trying to give me more information?
          Thanks in advance.

          Show
          gbois Gregory Boissinot added a comment - Victor, Please could you help me to fix it by trying to give me more information? Thanks in advance.
          Hide
          v2v Victor Martinez added a comment -

          Hello Gregory,

          I've tried to see the same error using the same environment, but it seems I cannot produce it again, I was confused why it took the master instead a slave. So please, close this ticket, let you know if I see it again

          Thanks

          Show
          v2v Victor Martinez added a comment - Hello Gregory, I've tried to see the same error using the same environment, but it seems I cannot produce it again, I was confused why it took the master instead a slave. So please, close this ticket, let you know if I see it again Thanks
          Hide
          mmrazik Martin Mrazik added a comment -

          I can still see this issue with 0.21:
          ------------------------
          Polling started on Aug 15, 2012 1:55:30 PM
          Polling for the job X
          Looking nodes where the poll can be run.
          Looking for a node to the restricted label generic.
          Can't find any eligible nodes.
          Trying to poll on master node.

          Polling on master.
          The expected script
          [...]
          ------------------------

          Plugin Version: 0.21
          Jenkins Version: 1.424.6
          Java Version: 1.6.0_24 (OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3))
          OS Server side: Ubuntu 12.04 LTS

          The node with "generic" label is a libvirt managed VM and it is online when the polling is happening (its online all the time). Regular jobs are properly executed on it when I restrict them so. Just polling seems to be always executing on master.

          Show
          mmrazik Martin Mrazik added a comment - I can still see this issue with 0.21: ------------------------ Polling started on Aug 15, 2012 1:55:30 PM Polling for the job X Looking nodes where the poll can be run. Looking for a node to the restricted label generic. Can't find any eligible nodes. Trying to poll on master node. Polling on master. The expected script [...] ------------------------ Plugin Version: 0.21 Jenkins Version: 1.424.6 Java Version: 1.6.0_24 (OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)) OS Server side: Ubuntu 12.04 LTS The node with "generic" label is a libvirt managed VM and it is online when the polling is happening (its online all the time). Regular jobs are properly executed on it when I restrict them so. Just polling seems to be always executing on master.
          Hide
          mmrazik Martin Mrazik added a comment -

          Reopening as per previous comment

          Show
          mmrazik Martin Mrazik added a comment - Reopening as per previous comment
          Hide
          mmrazik Martin Mrazik added a comment -

          Strangely enough I can not reproduce on my "staging" jenkins (the previous one is production jenkins) which is the same version of OS/Plugin/Jenkins/Java. The difference is just set of installed plugins. I'm trying to debug a bit more.

          Show
          mmrazik Martin Mrazik added a comment - Strangely enough I can not reproduce on my "staging" jenkins (the previous one is production jenkins) which is the same version of OS/Plugin/Jenkins/Java. The difference is just set of installed plugins. I'm trying to debug a bit more.
          Hide
          gbois Gregory Boissinot added a comment -

          Ok thanks for your last comment.
          I set to Fixed for now. And reopen it you reproduce it.

          Show
          gbois Gregory Boissinot added a comment - Ok thanks for your last comment. I set to Fixed for now. And reopen it you reproduce it.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              v2v Victor Martinez
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: