From: Sage Weil Date: Thu, 27 Mar 2014 15:06:16 +0000 (-0700) Subject: schedule_suite: ugly hack to set priority when scheduling X-Git-Tag: 1.1.0~1556^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F234%2Fhead;p=teuthology.git schedule_suite: ugly hack to set priority when scheduling 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 --- diff --git a/schedule_suite.sh b/schedule_suite.sh index bfc93441b..9eca3ea14 100755 --- a/schedule_suite.sh +++ b/schedule_suite.sh @@ -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 [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