From fd6056bedf99b665affd4657e34de688def373a8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 27 Mar 2014 08:06:16 -0700 Subject: [PATCH] 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 --- schedule_suite.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/schedule_suite.sh b/schedule_suite.sh index bfc93441bf039..9eca3ea1443a8 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 -- 2.39.5