[Swift-commit] r5669 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Feb 22 16:58:48 CST 2012


Author: davidk
Date: 2012-02-22 16:58:48 -0600 (Wed, 22 Feb 2012)
New Revision: 5669

Modified:
   trunk/bin/start-coaster-service
Log:
Better fix to work around bug #467 - one worker per node with coaster-service


Modified: trunk/bin/start-coaster-service
===================================================================
--- trunk/bin/start-coaster-service	2012-02-22 22:58:44 UTC (rev 5668)
+++ trunk/bin/start-coaster-service	2012-02-22 22:58:48 UTC (rev 5669)
@@ -377,7 +377,7 @@
 fi
 
 echo $! >> $PID_FILE
-sleep 5
+sleep 15
 
 # Determine SERVICE_PORT
 if [ -z "$SERVICE_PORT" ]; then
@@ -400,6 +400,21 @@
 echo Service port: $SERVICE_PORT
 echo Local port: $LOCAL_PORT
 
+# Generate sites.xml
+export EXECUTION_URL="http://$IPADDR:$SERVICE_PORT"
+echo Generating sites.xml
+if [ -f "gensites.template" ]; then
+   gensites `cat gensites.template` -p $CONFIG_FILE > $RUN_DIR/sites.xml
+else
+   gensites persistent-coasters -p $CONFIG_FILE > $RUN_DIR/sites.xml
+fi
+
+# For evil bug #467 
+echo "app echo (string i) { echo i; }" > hi.swift
+echo "echo(\"hi\");" >> hi.swift
+swift -sites.file sites.xml -tc.file tc.data -config cf hi.swift > /dev/null 2>&1 &
+DUMMYPID=$!
+
 # Start workers
 case $WORKER_MODE in
    ssh)
@@ -425,14 +440,8 @@
       ;;
 esac
 
-# Generate sites.xml
-export EXECUTION_URL="http://$IPADDR:$SERVICE_PORT"
-echo Generating sites.xml
-if [ -f "gensites.template" ]; then
-   gensites `cat gensites.template` -p $CONFIG_FILE > $RUN_DIR/sites.xml
-else
-   gensites persistent-coasters -p $CONFIG_FILE > $RUN_DIR/sites.xml
-fi
+# Wait for dummy script to finish
+wait $DUMMYPID
 
 # Generate config file
 if [ "$SHARED_FILESYSTEM" == "no" ]; then




More information about the Swift-commit mailing list