download-slave.sh creates empty slave.jar if download fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jenkins (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
download-slave.sh creates empty slave.jar if download fails for some reason (name resolution or network error for example) Thus the slave fails to starts with the following error in upstart job log file:
-----
Downloading slave.jar from http://
Error: Invalid or corrupt jarfile /var/run/
-----
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: jenkins-slave 1.509.2+dfsg-1
ProcVersionSign
Uname: Linux 3.11.0-4-generic x86_64
ApportVersion: 2.12.1-0ubuntu3
Architecture: amd64
Date: Fri Sep 6 11:41:44 2013
MarkForUpload: True
PackageArchitec
SourcePackage: jenkins
UpgradeStatus: Upgraded to saucy on 2012-01-31 (583 days ago)
modified.
mtime.conffile.
Proposition of patch to debian/ bin/download- slave.sh
--- download-slave.sh 2013-09-06 11:54:16.017977718 +0200 slave.sh. new 2013-09-06 11:51:43.541982223 +0200 URL}/jnlpJars/ slave.jar
+++ download-
@@ -13,7 +13,7 @@
wget -q -O ${SLAVE_JAR} ${JENKINS_
# Check to make sure slave.jar was downloaded.
-if [ -f ${SLAVE_JAR} ]
+if [ -s ${SLAVE_JAR} ]
then
exit 0
else