testbed nova instance flavor selection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu CI Engine |
Confirmed
|
High
|
Vincent Ladeuil |
Bug Description
Selecting the testbed nova instance flavor broke when we moved from canonistack to hpcloud because those clouds use different names.
In the general case, tests don't consume a lot of resources so we can default to m1.small for canonistack and standard.small for hpcloud (fix in progress for bug #1287955).
Points to consider:
- we want a sane default that works for supported clouds (see below),
- we need a way to override that default for specific packages/tickets while providing some way to avoid abuses (how do we prevent someone from picking an xxl image so their tests complete faster than everyone elses)
ev proposed:
from novaclient.v1_1 import client
import os
import sys
def find_flavour(
'''Find the most minimal flavour that meets the vCPU and memory
constraints.'''
flavors = nova_client.
filtered = [x for x in flavors if x.vcpus >= min_vcpu and x.ram >= min_mem]
if len(filtered) < 1:
msg = 'Could not find any flavors that matched the constraints'
msg = '%s (%d vCPU, %d mem)' % (msg, min_vcpu, min_mem)
raise KeyError, msg
by_cpu = sorted(filtered, cmp=lambda x, y: cmp(x.vcpus, y.vcpus))
by_mem = sorted(by_cpu, cmp=lambda x, y: cmp(x.ram, y.ram))
return by_mem[0]
if __name__ == '__main__':
args = [
]
nova_client = client.
print find_flavour(
Which would give us a cloud agnostic default (well, based on min_vcpu and min_mem but that's better than using cloud specific names).
Changed in ubuntu-ci-services-itself: | |
assignee: | nobody → Vincent Ladeuil (vila) |
summary: |
- testbed nova instance selection + testbed nova instance flavor selection |
tags: | added: airline |
Changed in uci-engine: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Vincent Ladeuil (vila) |
milestone: | none → backlog |
no longer affects: | ubuntu-ci-services-itself |
description: | updated |