remoteFs should be automatically created by agents on-demand. Robert has pointed to the right part of the code.
However, there are some tricky bits with that... 1. Jenkins agent is able to connect and ACCEPT RUNS even if RemoteFs is not writable 2. The runs will obviously fail, but it won't prevent Jenkins from scheduling new Jobs to there In order to fix this problem, in Remoting 3.8 I have introduced support of Work Directories <https://github.com/jenkinsci/remoting/blob/master/docs/workDir.md>. If an agent starts with with the "-workDir" flag, it will check write-ability of the work directory (which is equal to remoteFS for Java Web Start launchers) and fail if the directory is not writable. In order to enable such behavior, EC2 plugin just needs to pass the "-workDir" flag when the Remoting version supports it (Jenkins 2.68+). BR, Oleg четверг, 30 ноября 2017 г., 15:41:30 UTC+3 пользователь Robert Sandell написал: > > One example I found > https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/AbstractProject.java#L1200 > > /B > > 2017-11-30 12:30 GMT+01:00 Francis UPTON IV <[email protected] > <javascript:>>: > >> For a slave, is the remoteFs (like /var/jenkins) supposed to be created >> by the user or by Jenkins? I can't find any code where Jenkins creates it, >> and the description in the ec2 plugin is not clear. Should the ec2-plugin >> create this if it's not present (this seems wrong to me)? If the user is >> supposed to create it, then I need to make sure that's documented in the >> ec2-plugin. >> >> In my testing, the remote FS does not appear to be created by Jenkins >> anywhere. If Jenkins is supposed to create it, can someone point me to the >> code that does this? >> >> Thanks, >> Francis >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/9a902585-860b-4e28-b660-3a3c2f1c26b9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/9a902585-860b-4e28-b660-3a3c2f1c26b9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Robert Sandell > *Software Engineer* > *CloudBees Inc.* > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3ebcae03-2b41-4dd6-ae18-1835c6548a18%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
