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

Manual Resource reservation is ignored by job waiting for that resource

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins: 2.121.3
      Lockable Resources plugin: 2.3
    • Similar Issues:

      Description

      If Resource is reserved from Jenkins configuration page, already running job waiting for that resource ignores the new reservation.

      Create resource foo and prepare pipeline job with piece of code like this:

      lock(resource: "foo", quantity: 1) {
         sleep 120
      }

      Then perform following steps:

      1. Start this job twice in a row.
        {{ The first build should lock the resource and start the }}sleep step{{, the second will be waiting for the resource.}}
      2. Go to Manage Jenkins -> Configure System -> Lockable Resources Manager section and fill Reserved by field for the foo resource }}{{by some text{{ and apply the changes (you should do this within the configured sleep time in the job - 2 minutes in the example above).}}{{}}
      3. Wait till the first job finishes and check the second job.{{}}

      Actual results:
      The second job acquires the lock and continue to the sleep step.

      Expected results:
      The second job should stay waiting for the resource, because the resource was manually reserved!

        Attachments

          Activity

          Hide
          robertozdoba Robert Ozdoba added a comment -

          This has the potential to be an issue for my team and I as we transition from Freestyle to Pipeline builds. Are there plans to progress on this?

          Show
          robertozdoba Robert Ozdoba added a comment - This has the potential to be an issue for my team and I as we transition from Freestyle to Pipeline builds. Are there plans to progress on this?

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dahorak Daniel Horak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: