[JIRA] (JENKINS-59803) Manual Resource reservation is ignored by job waiting for that resource

1 view
Skip to first unread message

dahorak@redhat.com (JIRA)

unread,
Oct 16, 2019, 8:17:03 AM10/16/19
to jenkinsc...@googlegroups.com
Daniel Horak created an issue
 
Jenkins / Bug JENKINS-59803
Manual Resource reservation is ignored by job waiting for that resource
Issue Type: Bug Bug
Assignee: Tobias Gruetzmacher
Components: lockable-resources-plugin
Created: 2019-10-16 12:16
Environment: Jenkins: 2.121.3
Lockable Resources plugin: 2.3
Priority: Major Major
Reporter: Daniel Horak

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!

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages