[JIRA] (JENKINS-44111) Enable Remoting work dir by default in SSH Slaves Plugin

10 views
Skip to first unread message

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 4, 2018, 6:33:03 PM3/4/18
to jenkinsc...@googlegroups.com
Oleg Nenashev assigned an issue to Unassigned
 
Jenkins / New Feature JENKINS-44111
Enable Remoting work dir by default in SSH Slaves Plugin
Change By: Oleg Nenashev
Assignee: Oleg Nenashev
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

kuisathaverat@gmail.com (JIRA)

unread,
Aug 1, 2018, 10:09:03 AM8/1/18
to jenkinsc...@googlegroups.com
Change By: Ivan Fernandez Calvo
Assignee: Ivan Fernandez Calvo
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

kuisathaverat@gmail.com (JIRA)

unread,
Aug 1, 2018, 10:09:04 AM8/1/18
to jenkinsc...@googlegroups.com
Status: Open In Progress

kuisathaverat@gmail.com (JIRA)

unread,
Aug 1, 2018, 10:58:03 AM8/1/18
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Aug 1, 2018, 11:03:03 AM8/1/18
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo updated an issue
add a setting to the UI to enable the workDir that you want and set by default the root FS as workDir.

kuisathaverat@gmail.com (JIRA)

unread,
Aug 26, 2018, 3:16:03 AM8/26/18
to jenkinsc...@googlegroups.com
Status: In Review Resolved
Resolution: Fixed
Released As: ssh-slaves-1.27
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

me@basilcrow.com (JIRA)

unread,
Sep 6, 2018, 7:18:02 PM9/6/18
to jenkinsc...@googlegroups.com
Basil Crow commented on New Feature JENKINS-44111
 
Re: Enable Remoting work dir by default in SSH Slaves Plugin

Hi Ivan Fernandez Calvo,

I see you have marked this bug as Resolved; however, I wouldn't consider it resolved myself because I am still running into issues with the JAR cache not being in the remoting work directory.

I am running Jenkins 1.38 and ssh-slaves 1.28.1. My slave has a custom remote root directory set to /var/tmp/jenkins_slaves/developer/jenkins-ops.basil. I have not customized the default blank values of "Prefix Start Agent Command", "Suffix Start Agent Command", or "Remoting Work directory".

The SSH Slaves plugin launched the agent with these arguments:

$ ps aux | grep 16636
testrun+ 16636  4.9  0.7 8935864 141940 ?      Sl   15:56   0:10 java -jar remoting.jar -workDir /var/tmp/jenkins_slaves/developer/jenkins-ops.basil
$ ls -la /proc/16636/cwd
lrwxrwxrwx 1 testrunner testrunner 0 Sep  6 16:00 /proc/16636/cwd -> /var/tmp/jenkins_slaves/developer/jenkins-ops.basil
$

So far, so good. However, the JAR cache in the remoting work directory is unused:

$ sudo lsof +D /var/tmp/jenkins_slaves/developer/jenkins-ops.basil/remoting/jarCache
$

Instead, the JARs are in the user's home directory:

$ ls -la /proc/16636/fd | grep jar$
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 27 -> /home/testrunner/.jenkins/cache/jars/45/7D1F280AA7032BF63A03A6373A4567.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 28 -> /home/testrunner/.jenkins/cache/jars/37/E5427196D65650CF3C42C210055645.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 30 -> /home/testrunner/.jenkins/cache/jars/F2/84FCC8C54FBFD68EF9E319A863DC13.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 31 -> /home/testrunner/.jenkins/cache/jars/68/275882C8D31CAC88CDDAFAD86DA00E.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 32 -> /home/testrunner/.jenkins/cache/jars/52/2E6E3E1C7BC42C922CB96F9827053E.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 33 -> /home/testrunner/.jenkins/cache/jars/9D/A971C5B4DEE22798C5DE5187375513.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 34 -> /home/testrunner/.jenkins/cache/jars/9E/2AF9045A0E0FBF520FE664585A9E4F.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 35 -> /home/testrunner/.jenkins/cache/jars/10/D6706954D98E54D3BBC6FC9632E8C8.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 36 -> /home/testrunner/.jenkins/cache/jars/1F/010F383654E1F95625595B64691EA1.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 37 -> /home/testrunner/.jenkins/cache/jars/E2/DB61AFEAF868ABF5814EADCE114406.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 38 -> /home/testrunner/.jenkins/cache/jars/DB/8A4DF2E81A8CAD5CE8FFDC86EB96D0.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 39 -> /home/testrunner/.jenkins/cache/jars/F3/D242560AF5B707558485E723CB0CCF.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 40 -> /home/testrunner/.jenkins/cache/jars/80/A8CA5D38908CA3ACA438F7395BFCC4.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 41 -> /home/testrunner/.jenkins/cache/jars/19/D84AFBF2DB88C3862487B83051DB9B.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 42 -> /home/testrunner/.jenkins/cache/jars/E3/8E9F4A8B3127DE325345EAF90DFA04.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 43 -> /home/testrunner/.jenkins/cache/jars/D8/43212FAB3EE2939EBC386D926B205B.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 44 -> /home/testrunner/.jenkins/cache/jars/A3/45F6FD31301426ACC6BCE98E42C87A.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 45 -> /home/testrunner/.jenkins/cache/jars/28/BD24AE31D699682C04D2017BE4037C.jar
lr-x------ 1 testrunner testrunner 64 Sep  6 15:56 46 -> /home/testrunner/.jenkins/cache/jars/21/06F1EF0FB710683187C98FE4AA61C3.jar

This is not what is expected given the remoting work directory documentation. The latter states that the JARs should be in the /var/tmp/jenkins_slaves/developer/jenkins-ops.basil/remoting/jarCache directory. And Oleg Nenashev has confirmed my interpretation above. So clearly something is still not working correctly.

As a workaround, I adjusted the "Suffix Start Agent Command" to read {{ -jar-cache /var/tmp/jenkins_slaves/developer/jenkins-ops.basil/jarCache}}. And this has worked around the issue and my JARs are now going in the right place. But this should just work by default.

kuisathaverat@gmail.com (JIRA)

unread,
Sep 7, 2018, 5:49:03 AM9/7/18
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo reopened an issue
 

I confirmed that it happened with Jenkins 2.141 and SSH Slaves 1.28.1, this is a parameter in remoting so it would be an issue in remoting, I will add the label of remoting, then I will try to find a workaround in the SSH slaves plugin

Resolution: Fixed
Status: Resolved Reopened

kuisathaverat@gmail.com (JIRA)

unread,
Sep 7, 2018, 5:49:04 AM9/7/18
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Sep 7, 2018, 5:51:03 AM9/7/18
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo updated an issue
add a setting to the UI to enable the workDir that you want and set by default the root FS as workDir.


Remoting do not honored the -workdir parameter and it uses $HOME/.jenkins/.cache/jars for the jars cache, It was confirmed on Jenkins 2.141 and SSH Slaves 1.28.1

kuisathaverat@gmail.com (JIRA)

unread,
Sep 7, 2018, 5:52:06 AM9/7/18
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 2:52:03 PM7/21/19
to jenkinsc...@googlegroups.com
Status: Reopened In Progress

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 2:52:03 PM7/21/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Sep 12, 2019, 4:21:04 PM9/12/19
to jenkinsc...@googlegroups.com
Status: In Review Resolved
Resolution: Fixed
Released As: ssh-slaves-1.27 , ssh-slaves-1.30.2
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages