Merge branch 'wip-machine-based-workers'

This commit is contained in:
Sandon Van Ness 2013-07-18 19:37:25 -07:00
commit a2efc17305
4 changed files with 18 additions and 15 deletions

View File

@ -56,6 +56,7 @@ echo "teuthology branch $teuthology_branch"
fn="/tmp/schedule.suite.$$"
trap "rm $fn" EXIT
cat <<EOF > $fn
teuthology_branch: $teuthology_branch
kernel:
kdb: true
sha1: $KERNEL_SHA1
@ -119,4 +120,4 @@ echo "name $name"
--email $email \
--timeout 36000 \
--name $name \
--branch $teuthology_branch
--worker $mtype

View File

@ -81,11 +81,15 @@ describe. One job is run at a time.
log.debug('Config is: %s', job.body)
job_config = yaml.safe_load(job.body)
safe_archive = safepath.munge(job_config['name'])
teuthology_branch=job_config.get('config').get('teuthology_branch', 'master')
teuth_path = os.path.join(os.getenv("HOME"), 'teuthology-' + teuthology_branch, 'virtualenv', 'bin')
if not os.path.isdir(teuth_path):
raise Exception('Teuthology branch ' + teuthology_branch + ' not found at ' + teuth_path)
if job_config.get('last_in_suite', False):
log.debug('Generating coverage for %s', job_config['name'])
args = [
os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-results'),
os.path.join(teuth_path, 'teuthology-results'),
'--timeout',
str(job_config.get('results_timeout', 21600)),
'--email',
@ -101,12 +105,12 @@ describe. One job is run at a time.
safepath.makedirs(ctx.archive_dir, safe_archive)
archive_path = os.path.join(ctx.archive_dir, safe_archive, str(job.jid))
log.info('Running job %d', job.jid)
run_job(job_config, archive_path)
run_job(job_config, archive_path, teuth_path)
job.delete()
def run_job(job_config, archive_path):
def run_job(job_config, archive_path, teuth_path):
arg = [
os.path.join(os.path.dirname(sys.argv[0]), 'teuthology'),
os.path.join(teuth_path, 'teuthology'),
]
if job_config['verbose']:

View File

@ -264,9 +264,9 @@ def schedule():
help='be more verbose',
)
parser.add_argument(
'-b', '--branch',
default='master',
help='which branch of teuthology to use',
'-w', '--worker',
default='plana',
help='which worker to use (type of machine)',
)
parser.add_argument(
'-s', '--show',
@ -289,9 +289,7 @@ def schedule():
import teuthology.queue
beanstalk = teuthology.queue.connect(ctx)
tube = 'teuthology'
if ctx.branch != 'master':
tube += '-' + ctx.branch
tube=ctx.worker
beanstalk.use(tube)
if ctx.show:

View File

@ -71,9 +71,9 @@ combination, and will override anything in the suite.
help='number of times to run/queue each job'
)
parser.add_argument(
'-b', '--branch',
default='master',
help='which branch of teuthology to use',
'-w', '--worker',
default='plana',
help='which worker to use (type of machine)',
)
parser.add_argument(
'config',
@ -97,7 +97,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,
'--worker', args.worker,
]
if args.verbose:
base_arg.append('-v')