[JIRA] (JENKINS-56029) Kubernetes Plugin: Concurrent builds do not have their own unique workspaces

1 view
Skip to first unread message

amgill1234@gmail.com (JIRA)

unread,
Feb 7, 2019, 12:10:02 PM2/7/19
to jenkinsc...@googlegroups.com
Amrit Gill created an issue
 
Jenkins / Bug JENKINS-56029
Kubernetes Plugin: Concurrent builds do not have their own unique workspaces
Issue Type: Bug Bug
Assignee: Unassigned
Components: kubernetes-plugin
Created: 2019-02-07 17:09
Priority: Blocker Blocker
Reporter: Amrit Gill

I am using the kubernetes plugin to dynamically create slaves on a k8s cluster.

When there are concurrent builds are running of a specific job, they are both using the same workspace which causes all sorts of issues. For example, if I have some cleanUp in my Jenkinsfile, and there are 2 concurrent builds running, if the build 1 finishes first and runs cleanWs(), it deletes everything from that Workspace. Since build 2 is also using the same workspace, build 2 also fails because it lost everything in its workspace ( because they were both using the same workspace ).

 

This behavior is not correct and it should match the native jenkins behavior when using static slaves.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

amgill1234@gmail.com (JIRA)

unread,
Feb 7, 2019, 12:14:02 PM2/7/19
to jenkinsc...@googlegroups.com
Amrit Gill updated an issue
Change By: Amrit Gill
Cluster Version: 1.10

Plugin Version: 1.13.5

Jenkins Version: 2.159

 

I am using the kubernetes plugin to dynamically create slaves on a k8s cluster.

When there are concurrent builds are running of a specific job, they are both using the same workspace which causes all sorts of issues. For example, if I have some cleanUp in my Jenkinsfile, and there are 2 concurrent builds running, if the build 1 finishes first and runs cleanWs(), it deletes everything from that Workspace. Since build 2 is also using the same workspace, build 2 also fails because it lost everything in its workspace ( because they were both using the same workspace ).

 

This behavior is not correct and it should match the native jenkins behavior when using static slaves.

martin.sjolund@liu.se (JIRA)

unread,
Apr 9, 2019, 9:01:02 AM4/9/19
to jenkinsc...@googlegroups.com
Martin Sjölund commented on Bug JENKINS-56029
 
Re: Kubernetes Plugin: Concurrent builds do not have their own unique workspaces

I have similar issues where two parallel jobs in a pipeline each execute on a different pod on the same machine. They both try to do git pull at the same time, causing conflicts in the index.lock files, etc.

I would be perfectly happy with something like #47591 or simply having the possibility to not use persistent storage at all for my pod (slower, but at least would not break things and is probably easy to implement).

james@wti.net (JIRA)

unread,
Jul 30, 2019, 1:07:03 PM7/30/19
to jenkinsc...@googlegroups.com

Curious if there's any more details on this?

We're seeing a similar issue.

Are you using `node(POD_LABEL)` or just going straight to `container('containerName')`?

Reply all
Reply to author
Forward
0 new messages