2

I have configured a Jenkins master slave system with one master and two slaves. Every job is bound to a particular node. Some jobs are triggering others and those need the information of the first ones.

E.g. Job A is built on node A, creates a snapshot view (Clearcase) and connects it to the drive r:. Then it triggers job B, which is built on node A, too, and has to use the data of the view. Because there was a problem with access to Clearcase, the Jenkins slaves (Windows services) are logged on as an existing username and not as the default system user.

I thought that job B should have access to drive r:\, because job A and job B are on the same node with the same service and user. But although job A has created and mapped everything correctly and I can see these files when I log on to the server manually, job B can’t find the files.

Where is the mistake? Is it possible that a job can access a drive another job has mapped?

Thanks for every hint and help.

Sarah

Haras Brummi
  • 125
  • 7
  • Seems like X-Y question. Why not connect to drive in every job? There is no real overhead. Persistent driver mapping may help: http://serverfault.com/questions/426288/permanently-mount-network-share-without-the-need-for-log-on-windows – Jayan Feb 27 '16 at 13:35
  • Ok, I'll try. But I still don't understand. The server (node A) is always running and connected to the master. The windows service does not stop in between the jobs. Isn't it the service, which logs on, and not every single job? When I had tried to change the system user to another user, I already had the problem that the service did not log on again when I stopped and restarted the master. I started the jobs very often, but nothing changed. I had to restart the windows service on the node explicitily, and then it had used the new log on data. So I am really confused... – Haras Brummi Feb 27 '16 at 23:27
  • Could you configure slaves without service. . – Jayan Feb 28 '16 at 06:40
  • 1
    Yes! That worked! Configuring slaves without service is the solution. If you write your comment into an answer, I can mark this as solved. Thank you very much for your help. – Haras Brummi Feb 29 '16 at 11:52

1 Answers1

1

Jenkins allows different types of slaves. When you run the slave as service, the process has different session. The drives mapped in other sessions will not be applicable to it.

You can run jenkins slave in other modes such as "Swarm plugin", running a command on the slave machine (JNLP).

Jayan
  • 18,003
  • 15
  • 89
  • 143