[Swift-commit] r5326 - branches/release-0.93/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Nov 30 15:10:02 CST 2011


Author: davidk
Date: 2011-11-30 15:10:01 -0600 (Wed, 30 Nov 2011)
New Revision: 5326

Modified:
   branches/release-0.93/bin/start-coaster-service
   branches/release-0.93/bin/stop-coaster-service
Log:
Better handling for futuregrid VM termination and cleanup


Modified: branches/release-0.93/bin/start-coaster-service
===================================================================
--- branches/release-0.93/bin/start-coaster-service	2011-11-30 20:32:25 UTC (rev 5325)
+++ branches/release-0.93/bin/start-coaster-service	2011-11-30 21:10:01 UTC (rev 5326)
@@ -19,15 +19,15 @@
    fi
 
    echo Starting virtual machines.. please wait
-   $SWIFTVMBOOT_DIR/bin/bootit.sh
+   $SWIFTVMBOOT_DIR/bin/bootit.sh | tee -a bootit.log
    SWIFTVMBOOT_OUTPUT=$SWIFTVMBOOT_DIR/output.json
 
    if [ ! -f "$SWIFTVMBOOT_OUTPUT" ]; then
       crash "Error: Swift VM output file $SWIFTVMBOOT_OUTPUT does not exist!"
    fi
 
-   SWIFTVM_INSTANCES=`grep instance_id $SWIFTVMBOOT_OUTPUT |awk '{print $2}'|sed 's/\"//g;s/,//g;s/null//g'`
-   echo $SWIFTVM_INSTANCES > .swiftvm_instances
+   SWIFTVM_INSTANCE=`grep "Starting up run" bootit.log |awk '{print $4}'`
+   echo $SWIFTVM_INSTANCE >> $HOME/.swift/.swiftvm_instance
 
    WORKER_HOSTS=`grep hostname $SWIFTVMBOOT_OUTPUT |awk '{print $2}'|sed 's/\"//g;s/,//g;s/null//g'`
 
@@ -218,7 +218,7 @@
    crash "Unknown SERVICE_PORT type specified!"
 fi
 
-echo $! > $PID_FILE
+echo $! >> $PID_FILE
 sleep 5
 
 # Determine SERVICE_PORT

Modified: branches/release-0.93/bin/stop-coaster-service
===================================================================
--- branches/release-0.93/bin/stop-coaster-service	2011-11-30 20:32:25 UTC (rev 5325)
+++ branches/release-0.93/bin/stop-coaster-service	2011-11-30 21:10:01 UTC (rev 5326)
@@ -10,7 +10,7 @@
 
 # Location of required files
 PID_FILE="$HOME/.swift/.coaster-service-pids"
-SWIFTVM_INSTANCES="$HOME/.swift/.swiftvm_instances"
+SWIFTVM_INSTANCES="$HOME/.swift/.swiftvm_instance"
 
 # Import settings
 if [ -f "./coaster-service.conf" ]; then




More information about the Swift-commit mailing list