Allow scheduled jobs to use different teuthology branches

teuthology-[schedule|suite] get a parameter to specify the branch,
to put the job in a branch-specific queue. Workers running that
branch of teuthology can pull jobs from that queue.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Josh Durgin 2012-09-21 14:54:19 -07:00
parent 57bb434def
commit a09153b688
4 changed files with 30 additions and 4 deletions

View File

@ -69,9 +69,16 @@ fi
stamp=`date +%Y-%m-%d_%H:%M:%S`
name=`whoami`"-$stamp-$suite-$ceph-$kernel-$flavor"
if wget http://github.com/ceph/teuthology/tree/$ceph -O- 2>/dev/null ; then
teuthology_branch=$ceph
else
echo "branch $ceph not in teuthology.git; will use master for teuthology"
teuthology_branch='master'
fi
~/src/teuthology/virtualenv/bin/teuthology-suite -v $fn \
--collections ~/src/ceph-qa-suite/suites/$suite/* \
--email $email \
--timeout 21600 \
--name $name
--name $name \
--branch $teuthology_branch

View File

@ -38,6 +38,11 @@ describe. One job is run at a time.
help='path in which to store logs',
required=True,
)
parser.add_argument(
'-t', '--tube',
help='which beanstalk tube to read jobs from',
required=True,
)
ctx = parser.parse_args()
@ -62,7 +67,7 @@ describe. One job is run at a time.
read_config(ctx)
beanstalk = connect(ctx)
beanstalk.watch('teuthology')
beanstalk.watch(ctx.tube)
beanstalk.ignore('default')
while True:

View File

@ -228,6 +228,11 @@ def schedule():
default=False,
help='be more verbose',
)
parser.add_argument(
'-b', '--branch',
default='master',
help='which branch of teuthology to use',
)
ctx = parser.parse_args()
if not ctx.last_in_suite:
@ -242,7 +247,10 @@ def schedule():
import teuthology.queue
beanstalk = teuthology.queue.connect(ctx)
beanstalk.use('teuthology')
tube = 'teuthology'
if ctx.branch != 'master':
tube += '-' + ctx.branch
beanstalk.use(tube)
if ctx.delete:
for jobid in ctx.delete:

View File

@ -65,6 +65,11 @@ combination, and will override anything in the suite.
type=int,
help='number of times to run/queue each job'
)
parser.add_argument(
'-b', '--branch',
default='master',
help='which branch of teuthology to use',
)
parser.add_argument(
'config',
metavar='CONFFILE',
@ -87,6 +92,7 @@ combination, and will override anything in the suite.
os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-schedule'),
'--name', args.name,
'--num', str(args.num),
'--branch', args.branch,
]
if args.verbose:
base_arg.append('-v')