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

rebuild of nested pipeline on given node label stays in pending queue forever

    Details

    • Similar Issues:

      Description

      I have two pipeline jobs: main-pipeline-A and child-pipeline-B, where main-pipeline-A calls another pipeline job: child-pipelineB. Both pipeline jobs have a NODELABEL parameter to specify the label on which the pipeline job should be run. The main pipeline also passes the nodelabel value when calling the child pipeline. Here is the main pipeline code that does this:

      build job: 'child-pipeline-B',
                      parameters: [
                                            [$class: 'NodeParameterValue', name: 'NODELABEL',
                                            labels: [NODELABEL], nodeEligibility: [$class: 'AllNodeEligibility']]
                                          ]

      They work as expected: when the the main pipeline is kicked off, it runs on the specified label, passes the specified label to child job and the child runs on the specified label. It also works if I directly kickoff child-pipeline-B or if I do "Rebuild" of the main-pipeline-A job.

      It does not work if I do a "Rebuild" of the child-pipeline-B job which was previously run/called by main-pipeline-A job. It stays in the queue forever with a message:

      "

      #6

      (pending—There are no nodes with the label ‘’)"
       
      even though a valid label was specified.
       
      Also note that if child-pipeline-B was run directly instead of called from main-pipeline-A job, then "Rebuild" works as expected. So this issue only occurs when I try to "Rebuild" child-pipeline-B job which was originally called by main-pipeline-A job.
       
      Attaching two config files for the pipeline job, so it should be easy to reproduce.
       

        Attachments

          Activity

          Hide
          hemanglavana HemangLavana added a comment -

          A workaround is to use the "Replay" button to do the rebuild of the child-pipeline-B job. It does not provide a mechanism to change the parameter values but it works when we want to run the same job with same parameters again.

          Show
          hemanglavana HemangLavana added a comment - A workaround is to use the "Replay" button to do the rebuild of the child-pipeline-B job. It does not provide a mechanism to change the parameter values but it works when we want to run the same job with same parameters again.
          Hide
          himanshuch91 Himanshu Chaudhary added a comment - - edited

          This can be resolved by using the below pipeline code

          build job: 'child-pipeline-B', 
                          parameters: [
                                                [$class: 'LabelParameterValue', name: 'NODELABEL',
                                                label: "NODELABEL", nodeEligibility: [$class: 'AllNodeEligibility']]
                                              ]

          Show
          himanshuch91 Himanshu Chaudhary added a comment - - edited This can be resolved by using the below pipeline code build job: 'child-pipeline-B',                  parameters: [                                       [$class: 'LabelParameterValue', name: 'NODELABEL',                                       label: "NODELABEL", nodeEligibility:  [$class: 'AllNodeEligibility'] ]                                     ]

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              hemanglavana HemangLavana
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: