-
Bug
-
Resolution: Unresolved
-
Major
-
Slave must be a "Unix via SSH" slave. I suspect the master must be Unix-based also. I tested with both the master and slave on Linux.
When archiving artifacts from a job executed on a "Unix via SSH" slave, if a symlink is present and archived before its target, the archiving will fail. It looks like the master is trying to chmod the local symlink (because it has executable permissions stored in the tar used to do the remote copy), but that fails because the target doesn't exist yet, and the exception aborts the archiving. I think the solution is to just not chmod symlinks, since they don't have modes of their own. This was a regression from 1.455 to 1.456. I suspect the fixes for JENKINS-9118 are the cause.
To reproduce this problem, install the Jenkins master on a Linux machine and add a "Unix via SSH" slave that is also a Linux machine. Create a job with the following build script:
rm -rf stuff mkdir stuff cd stuff touch zzfile ln -s zzfile aafile ln -s zzfile bbfile
Restrict this project to build on the slave. Set up archiving for "stuff/*". Run the job. The job will complete successfully, but archiving will abort partway though with a stack trace in the console.
Archiving artifacts ERROR: Failed to archive artifacts: stuff/* hudson.util.IOException2: Failed to extract /tmp/jenkins-slave-home/workspace/create_symlinks/stuff/* at hudson.FilePath.readFromTar(FilePath.java:1817) at hudson.FilePath.copyRecursiveTo(FilePath.java:1729) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: java.io.IOException: Failed to chmod /tmp/jenkins-home/jobs/create_symlinks/builds/2012-03-21_16-53-15/archive/stuff/aafile : No such file or directory at hudson.FilePath._chmod(FilePath.java:1248) at hudson.FilePath.readFromTar(FilePath.java:1813) ... 12 more
- depends on
-
JENKINS-14351 Outdated JRuby libs
- Resolved
- is duplicated by
-
JENKINS-13241 Artifact archiving from remote slave fails
- Resolved
-
JENKINS-13280 Fix for JENKINS-9118 breaks archival if symlink referent is in the archive
- Resolved
-
JENKINS-13645 Symlinks in archives cause archiving to fail
- Resolved
-
JENKINS-14021 HP-UX doesn't have readlink
- Resolved
-
JENKINS-14947 Build fail from UnsupportedOperationException during Doxygen post-build step
- Resolved
- is related to
-
JENKINS-15301 HTML Publisher failure: Failed to extract directory from slave
- Reopened
-
JENKINS-13614 archiving artefacts from remote MacOS X, IBM AIX slave fails
- Resolved