[Swift-commit] r5054 - trunk/bin/grid

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Sep 1 16:09:25 CDT 2011


Author: wilde
Date: 2011-09-01 16:09:25 -0500 (Thu, 01 Sep 2011)
New Revision: 5054

Modified:
   trunk/bin/grid/foreachsite
   trunk/bin/grid/run-worker.sh
Log:
fixed problem in foreachsite; edits to run-worker.

Modified: trunk/bin/grid/foreachsite
===================================================================
--- trunk/bin/grid/foreachsite	2011-09-01 20:10:12 UTC (rev 5053)
+++ trunk/bin/grid/foreachsite	2011-09-01 21:09:25 UTC (rev 5054)
@@ -6,13 +6,12 @@
 
 # FIXME: test for valid proxy
 
-# Usage: foreachsite [-resource fork|worker ] scriptname
+usage="$0 foreachsite [-resource fork|worker ] [-sites alt-sites-file] scriptname"
 
-usage="$0 foreachsite [-resource fork|worker ] scriptname"
-
 # Process command line arguments
 while [ $# -gt 0 ]; do
   case $1 in
+    -sites) sitefile=$2; shift 2;;
     -resource) resource=$2; shift 2 ;;
     -*) echo $usage 1>&2
         exit 1 ;;
@@ -31,10 +30,13 @@
 
 echo Running foreachsite: resource=$resource script=$scriptparam rundir=$rundir
 
-# swift-osg-ress-site-catalog --engage-verified --condor-g >osg.xml
-swift-osg-ress-site-catalog --engage  --condor-g >osg.xml
+if [ _$sitefile = _ ]; then
+  sitefile=osg.xml
+  # swift-osg-ress-site-catalog --engage  --condor-g >osg.xml
+  swift-osg-ress-site-catalog --vo=engage  --condor-g >osg.xml
+fi
 
-for jobmanager in $(grep gridRes osg.xml | sed -e 's/^.* //' -e 's/<.*//' ); do
+for jobmanager in $(grep gridRes $sitefile | sed -e 's/^.* //' -e 's/<.*//' ); do
   ( sitename=$(echo $jobmanager | sed -e 's,/.*,,')  # strip off batch jobmanager /jobmanager, leaving site name
     mkdir $sitename
     cd $sitename

Modified: trunk/bin/grid/run-worker.sh
===================================================================
--- trunk/bin/grid/run-worker.sh	2011-09-01 20:10:12 UTC (rev 5053)
+++ trunk/bin/grid/run-worker.sh	2011-09-01 21:09:25 UTC (rev 5054)
@@ -12,6 +12,8 @@
 logdir=$(mktemp -d $OSG_WN_TMP/${workername}.workerdir.XXXXXX)
 nlines=1000
 
+PATH=$OSG_APP/extenci/aashish/terfix/bin:$PATH
+
 echo "=== contact: $contact"
 echo "=== name:    $workername Running in dir $(pwd)"
 echo "=== cwd:     $(pwd)"




More information about the Swift-commit mailing list