[Swift-commit] r5348 - in branches/release-0.93: bin libexec
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Tue Dec 6 15:37:20 CST 2011
Author: davidk
Date: 2011-12-06 15:37:20 -0600 (Tue, 06 Dec 2011)
New Revision: 5348
Modified:
branches/release-0.93/bin/start-coaster-service
branches/release-0.93/bin/stop-coaster-service
branches/release-0.93/libexec/_swiftwrap.staging
Log:
stop-coaster-service should terminate instances, not just stop them
_swiftwrap.staging should allow for empty stdout/err files (bug #463)
Modified: branches/release-0.93/bin/start-coaster-service
===================================================================
--- branches/release-0.93/bin/start-coaster-service 2011-12-06 19:30:29 UTC (rev 5347)
+++ branches/release-0.93/bin/start-coaster-service 2011-12-06 21:37:20 UTC (rev 5348)
@@ -82,6 +82,9 @@
# Start worker script
for MACHINE in $WORKER_HOSTS
do
+ # Create a list of machines for other applications, if needed
+ echo $MACHINE >> $HOME/.swift/.machines
+
# Enable ssh tunneling if needed
if [ "$SSH_TUNNELING" == "yes" ]; then
ssh -q -o StrictHostKeyChecking=no -R *:$PORT:localhost:$PORT $WORKER_USERNAME@$MACHINE sleep 999 &
@@ -192,9 +195,10 @@
else
crash "Cannot find coaster-service.conf!"
fi
+cp $CONFIG_FILE $HOME/.swift/.config
-echo "start-coaster-service..."
-echo "configuration: $CONFIG_FILE"
+echo "Start-coaster-service..."
+echo "Configuration: $CONFIG_FILE"
source $CONFIG_FILE
Modified: branches/release-0.93/bin/stop-coaster-service
===================================================================
--- branches/release-0.93/bin/stop-coaster-service 2011-12-06 19:30:29 UTC (rev 5347)
+++ branches/release-0.93/bin/stop-coaster-service 2011-12-06 21:37:20 UTC (rev 5348)
@@ -13,16 +13,7 @@
SWIFTVM_INSTANCES="$HOME/.swift/.swiftvm_instance"
# Import settings
-if [ -f "./coaster-service.conf" ]; then
- CONFIG_FILE="./coaster-service.conf"
-elif [ -f "$HOME/.swift/coaster-service.conf" ]; then
- CONFIG_FILE="$HOME/.swift/coaster-service.conf"
-elif [ -f "$(dirname $(readlink -f $0))/../etc/coaster-service.conf" ]; then
- CONFIG_FILE="$(dirname $(readlink -f $0))/../etc/coaster-service.conf"
-else
- crash "Cannot find coaster-service.conf!"
-fi
-
+CONFIG_FILE=$HOME/.swift/.config
source "$CONFIG_FILE"
echo Ending coaster processes..
@@ -52,9 +43,15 @@
for INSTANCE in `cat $SWIFTVM_INSTANCES`
do
echo Stopping ec2 instance $INSTANCE...
- $SWIFTVMBOOT_DIR/bin/gp-instance-stop $INSTANCE | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
+ $SWIFTVMBOOT_DIR/bin/gp-instance-terminate $INSTANCE | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
+
done
rm $SWIFTVM_INSTANCES > /dev/null 2>&1
fi
+if [ -f "$HOME/.swift/.machines" ]; then
+ rm "$HOME/.swift/.machines"
+fi
+
popd > /dev/null 2>&1
+echo Done
Modified: branches/release-0.93/libexec/_swiftwrap.staging
===================================================================
--- branches/release-0.93/libexec/_swiftwrap.staging 2011-12-06 19:30:29 UTC (rev 5347)
+++ branches/release-0.93/libexec/_swiftwrap.staging 2011-12-06 21:37:20 UTC (rev 5348)
@@ -302,15 +302,6 @@
fi
checkError $? "Application $EXEC failed with an exit code of $?" <$STDERR
-if [ ! -s "$STDOUT" ]; then
- log "Removing empty stdout"
- rm -f $STDOUT
-fi
-if [ ! -s "$STDERR" ]; then
- log "Removing empty stderr"
- rm -f $STDERR
-fi
-
logstate "EXECUTE_DONE"
log "Job ran successfully"
More information about the Swift-commit
mailing list