[Swift-commit] r5787 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu May 10 23:23:58 CDT 2012


Author: davidk
Date: 2012-05-10 23:23:58 -0500 (Thu, 10 May 2012)
New Revision: 5787

Modified:
   trunk/bin/start-coaster-service
   trunk/bin/stop-coaster-service
Log:
Let start-coaster scripts work with non-OSG condor providers (UC3)


Modified: trunk/bin/start-coaster-service
===================================================================
--- trunk/bin/start-coaster-service	2012-05-10 12:27:54 UTC (rev 5786)
+++ trunk/bin/start-coaster-service	2012-05-11 04:23:58 UTC (rev 5787)
@@ -257,6 +257,35 @@
    return 0
 }
 
+# Start condor workers
+start-workers-condor()
+{
+   PORT=$1
+   EXECUTION_URL=http://$IPADDR:$PORT
+   if [ -z "$PORT" ]; then
+      crash "start-workers-local: Port number not specified, giving up"
+   fi
+   echo Starting worker on local machine
+
+   if [ -z "$CONDOR_WORKERS" ]; then
+      crash "CONDOR_WORKERS undefined - please check coaster-service.conf"
+   fi
+
+cat <<EOF > start_workers.submit
+output = workers.stdout
+error = workers.stderr
+initialdir = $PWD 
+executable = $SWIFT_BIN/$WORKER
+arguments = $EXECUTION_URL node .
+notification = Never
+leave_in_queue = TRUE
+queue $CONDOR_WORKERS
+EOF
+
+   condor_submit start_workers.submit
+   return 0
+}
+
 # Start cobalt workers
 start-workers-cobalt()
 {
@@ -445,6 +474,9 @@
    ec2)
       start-workers-ec2 $LOCAL_PORT
       ;;
+   condor)
+      start-workers-condor $LOCAL_PORT
+      ;;
    *)
       crash "Unknown WORKER_MODE. Please modify coaster-service.conf"
       ;;

Modified: trunk/bin/stop-coaster-service
===================================================================
--- trunk/bin/stop-coaster-service	2012-05-10 12:27:54 UTC (rev 5786)
+++ trunk/bin/stop-coaster-service	2012-05-11 04:23:58 UTC (rev 5787)
@@ -60,6 +60,10 @@
    fi
 fi
 
+if [ "$WORKER_MODE" == "condor" ]; then
+   condor_rm $USER
+fi
+
 if [ -f "$HOME/.swift/machines" ]; then
    rm "$HOME/.swift/machines"
 fi




More information about the Swift-commit mailing list