Preventing two jobs to run simultaneously on same node but allowing to run simultaneously on different nodes

82 views
Skip to first unread message

ozonec...@gmail.com

unread,
Sep 28, 2015, 3:35:14 AM9/28/15
to Jenkins Users
Hi Jenkins Users,

I am using Jenkins 1.609

I have a requirement wherein
1) no two jobs can execute simultaneously on the same node but
2) they can execute simultaneously when triggered on different nodes.

No of executors configured on all slave nodes is 1.

Default Jenkins behavior:
If job A and job B, both are triggered on same node then Job B goes in executor starvation state because build is waiting for "too long" compared to the time it takes to execute it. Once job B goes in this state, it gets stuck and is not picked up for building.

Have tried using "Exclusion plugin". It helps in achieving first point but not the second one.

Also, have tried using Throttle concurrent builds plugin but still Job B goes into executor starvation state.

Is there any way wherein I can achieve both the points i.e. prevent running the jobs simultaneously on same node but can run on different nodes and without the second job going into executor starvation state as I cannot change the sequence of the jobs??

Thanks in advance!


Victor Martinez

unread,
Sep 28, 2015, 6:20:47 AM9/28/15
to Jenkins Users
Hi there,

 I believe "Throttle concurrent builds" plugin should work, in fact, it's exactly what I don in roder to run different builds. Have you tried with the below setup?

  
  I'm based on:
    - Jenkins ver. 1.599
    - throttle-concurrents ver. 1.8.3

I hope it helps

Cheers

Catalyst Approva

unread,
Oct 8, 2015, 8:46:17 AM10/8/15
to jenkins...@googlegroups.com
Thanks Victor!
Throttle concurrent build plugin did work. It seems i had incorrectly configured it previously but its working now. Thanks again!

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/F-AeRRUYWXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d1684b31-8673-48c8-9a86-233b9ed8b3e6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages