[ -z "$distro" ] && distro='ubuntu'
[ -z "$mtype" ] && mtype='plana'
+multi=`echo $mtype | awk -F' |,|-|\t' '{print NF}'`
+if [ $multi -gt 1 ]
+then
+ tube=multi
+else
+ tube=$mtype
+fi
+
stamp=`date +%Y-%m-%d_%H:%M:%S`
nicesuite=`echo $suite | sed 's/\//:/g'`
name=`whoami`"-$stamp-$nicesuite-$ceph-$kernel-$flavor-$mtype"
--email $email \
--timeout 36000 \
--name $name \
- --worker $mtype
+ --worker $tube
machines = json.loads(content)
log.debug('locked {machines}'.format(
machines=', '.join(machines.keys())))
- if machine_type == 'vps':
+ if machinetype == 'vps':
ok_machs = {}
for machine in machines:
if create_if_vm(ctx, machine):
log.info('Locking machines...')
assert isinstance(config[0], int), 'config[0] must be an integer'
machine_type = config[1]
+ machine_types = teuthology.get_multi_machine_types(machine_type)
how_many = config[0]
while True:
else:
assert 0, 'error listing machines'
- is_up = lambda machine: machine['up'] and machine['type'] == machine_type # noqa
+ is_up = lambda machine: machine['up'] and machine['type'] in machine_types # noqa
num_up = len(filter(is_up, machines))
assert num_up >= how_many, 'not enough machines are up'
# make sure there are machines for non-automated jobs to run
- is_up_and_free = lambda machine: machine['up'] and machine['locked'] == 0 and machine['type'] == machine_type # noqa
+ is_up_and_free = lambda machine: machine['up'] and machine['locked'] == 0 and machine['type'] in machine_types # noqa
up_and_free = filter(is_up_and_free, machines)
num_free = len(up_and_free)
if num_free < 6 and ctx.owner.startswith('scheduled'):