[JIRA] (JENKINS-39119) Can't lock nodes between stages

1 view
Skip to first unread message

justinrainwater78@gmail.com (JIRA)

unread,
Oct 19, 2016, 2:57:01 PM10/19/16
to jenkinsc...@googlegroups.com
Justin Rainwater created an issue
 
Jenkins / Improvement JENKINS-39119
Can't lock nodes between stages
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: pipeline
Created: 2016/Oct/19 6:56 PM
Priority: Major Major
Reporter: Justin Rainwater

In an effort to balance speed with a satisfying stage view, we've taken steps to ensure that each stage runs on the same node. That way we dont have to stash/unstash too often because that is a big performance hit. For situations where we want to checkout source, configure, build and test it's fastest to just have this happen on the same workspace on the same node.

The problem we've run into with this approach is that during that brief moment between a build and test stage for example, the node is available to all jobs and another job might grab it. We've attempted to work around this by getting clever with adding and removing node labels, but this creates all kinds of new bugs where labels don't get cleaned up or somehow a node ends up with labels from 2 different jobs at the same time.

I thought I might have found something with https://github.com/jenkinsci/lockable-resources-plugin but that still feels like a manual process with creating "resources" that would apply to nodes and kind of faking that relationship by naming the resources the same as the nodes.

The only way I can see at the moment to have the functionality and performance we're looking for is to combine all of the checkout+config+build+test into a single stage, but then we're losing much of what makes the pipeline workflow (and of course blue ocean) so useful.

I would like to be able to grab an available node based on labels as I do now but have it stay reserved across stages until I explicitly say I'm done with it or the pipeline job is complete. If this can't be added as a new feature then any advice as to how to achieve this behavior with existing functionality would be much appreciated.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

r.fuereder@xortex.com (JIRA)

unread,
Jan 19, 2017, 10:41:06 AM1/19/17
to jenkinsc...@googlegroups.com
Reinhold Füreder commented on Improvement JENKINS-39119
 
Re: Can't lock nodes between stages

I may not understand your requirements correctly, but I think the "Lockable Resources" plugin (you are mentioning) should (now) allow you what you need/want according to:

Because these "resources" are created automa(t|g)ically in pipelines?

andrew.bayer@gmail.com (JIRA)

unread,
Feb 23, 2018, 3:41:02 PM2/23/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
 
Change By: Andrew Bayer
Component/s: pipeline-model-definition-plugin
Component/s: pipeline
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Feb 23, 2018, 3:41:03 PM2/23/18
to jenkinsc...@googlegroups.com
Andrew Bayer resolved as Duplicate
 

Yup, marking this as a duplicate of JENKINS-46809, which is how this will be addressed in Declarative.

Change By: Andrew Bayer
Status: Open Resolved
Resolution: Duplicate

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:36 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Duplicate
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages