[Swift-commit] cog r3855

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jan 8 13:25:03 CST 2014


------------------------------------------------------------------------
r3855 | hategan | 2014-01-08 13:23:01 -0600 (Wed, 08 Jan 2014) | 1 line

Don't try to lock soft image things when no soft image has been requested
------------------------------------------------------------------------
Index: modules/provider-coaster/resources/worker.pl
===================================================================
--- modules/provider-coaster/resources/worker.pl	(revision 3854)
+++ modules/provider-coaster/resources/worker.pl	(working copy)
@@ -2291,14 +2291,17 @@
 			unlock($SOFT_IMAGE_CREATE_LOCK);
 		}
 	}
-	# wait until the soft image is created
-	wlog DEBUG, "Waiting for soft image\n";
-	my $createLock = readLock("$SOFT_IMAGE_DIR/.create");
-	wlog DEBUG, "Got soft image\n";
-	# no need to hold lock after that
-	unlock($createLock);
 	
-	$ENV{SOFTIMAGE} = $SOFT_IMAGE_DIR;
+	if (defined $SOFT_IMAGE_DIR) {
+		# wait until the soft image is created
+		wlog DEBUG, "Waiting for soft image\n";
+		my $createLock = readLock("$SOFT_IMAGE_DIR/.create");
+		wlog DEBUG, "Got soft image\n";
+		# no need to hold lock after that
+		unlock($createLock);
+		
+		$ENV{SOFTIMAGE} = $SOFT_IMAGE_DIR;
+	}
 	
 	my $cwd = getcwd();
 	# wlog DEBUG, "CWD: $cwd\n";



More information about the Swift-commit mailing list