]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
schedule_suite: ugly hack to set priority when scheduling
authorSage Weil <sage@inktank.com>
Thu, 27 Mar 2014 15:06:16 +0000 (08:06 -0700)
committerSage Weil <sage@inktank.com>
Thu, 27 Mar 2014 17:13:00 +0000 (10:13 -0700)
I don't want to add another arg at the end of the very long list of
optional args, so I'll use an environment variable.  Ugly!  But this whole
script needs to be replace anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
schedule_suite.sh

index bfc93441bf0396329e86a51bbbdd104461c2538d..9eca3ea1443a87d7a100e73bd7f1c0fcf1118bb3 100755 (executable)
@@ -10,6 +10,7 @@ mtype=$7
 template=$8
 distro=$9
 limit=${10}
+extra_args=""
 
 if [ -z "$limit" ]
 then
@@ -21,6 +22,7 @@ fi
 if [ -z "$kernel" ]; then
     echo "usage: $0 <suite> <ceph branch> <kernel branch> [email] [flavor] [teuthology-branch] [machinetype] [template] [distro]"
     echo "  flavor can be 'basic', 'gcov', 'notcmalloc'."
+    echo "  PRIO=123 in the environment sets priority (default 1000, smaller=higher)"
     exit 1
 fi
 
@@ -43,6 +45,11 @@ else
     tube=$mtype
 fi
 
+
+if [ "$PRIO" != "" ]; then
+    extra_args="$extra_args --priority $PRIO"
+fi
+
 stamp=`date +%Y-%m-%d_%H:%M:%S`
 nicesuite=`echo $suite | sed 's/\//:/g'`
 name=`whoami`"-$stamp-$nicesuite-$ceph-$kernel-$flavor-$tube"
@@ -201,4 +208,5 @@ echo "name $name"
     --timeout 36000 \
     $limitline \
     --name $name \
-    --worker $tube
+    --worker $tube \
+    $extra_args