Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Build Queue problem #926

alexz ·
Hi Robin,
I have few problems with build queue:
1. In case multiple configuration triggered at the same time by parent configuration, the priority level of triggered configurations is ignored.
2. I could not create limitation for number of simultaneous builds agent. I have followed an example described here http://wiki.pmease.com/display/QB21/Limit+Number+of+Concurrent+Jobs+on+Node
Is it correct that number of simultaneous builds controlled by number passed to Semaphore?
Is "resource1" arbitrary name or it have to be defined?
3. Job distribution is not equal per agent. I have observed cases when one build agent is idle and another have 2 builds simultaneously. This problem can be avoided for me by limiting number of simultaneous on agent to 1.
Regards,
Alex
  • replies 5
  • views 1656
  • stars 0
robinshen ADMIN ·
Hi Alex,

Priority only takes effect when there are builds waiting in the queue, in case of builds fired from the same trigger chain, queue limitation is not respected (to avoid deadlock as discussed in some other thread in this forum) so the priority setting is not considered. As to resource locking, it does not prevent builds from running since resource locking operates at step level, and a single build may contain multiple steps with some steps being waiting while others running.
Job distribution may not be even if builds are triggered simultaneously (especially if this is done through a trigger build step) since there is a gap between job assignment and node metric collection. But in the long run, the load should be even. In 3.0, we will improve build queue so that it also apply to builds in the same trigger chain and this problem should be able to addressed to some extent.

Regards
Robin
alexz ·
Hi,
I have reworked my step chain.
Now the mater step call sequential build step that should lock the resource as described http://wiki.pmease.com/display/QB21/Limit+Number+of+Concurrent+Jobs+on+Node.
But still there are few sequential build steps running on same agent simultaneously ignoring the resource lock.
Can you please explain following script?
groovy:
node.getResource("resource1", new java.util.concurrent.Semaphore(2)).acquire();

Is" Semaphore(2)" means that two resources can run simultaneously? Can it be change to one?
Is "resource1" arbitrary name or it have to be defined?
Regards,
Alex
robinshen ADMIN ·
Semaphone(2) means two copy of the resource, and if you change it to "Semaphore(1)", only one resource is available, and only one sequential step is permitted to run on this node. The name "resource1" is arbitrary, as long as all sequential steps running on this agent acquire resource of the same name.
alexz ·
Hi Robin,
Thank you for the response. I'm using Semaphone(1), but yet more than one step is running on my build agent.
I have described my step chain in previous comment.
Could you please advise me how to limit number of simultaneous builds on agent to one?
Thank you,
Alex
robinshen ADMIN ·
Hi Alex,

From build overview page, steps competing for resources are displayed as "running" . However only one step can do its job on that node if configured correctly and other steps will wait with the message "Executing pre-execute action...". Please check build log to see if this is the case.

If you believe multiple steps are actually doing its job on the same node, please send backup of your database and I will check what might be wrong there.