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

Manual Resource reservation is ignored by job waiting for that resource

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins: 2.121.3
      Lockable Resources plugin: 2.3

      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!

            Unassigned Unassigned
            dahorak Daniel Horak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: