]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
openstack: prefer vps-ssd-* flavors in OVH
authorNathan Cutler <ncutler@suse.com>
Fri, 12 May 2017 11:48:05 +0000 (13:48 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 14 Oct 2019 14:47:01 +0000 (16:47 +0200)
commit85bb3280e19e8ef28c552f38e179d07d124d79f0
treee75cdf51a5f5ba2a75c0ec14b9fc089ddad05597
parent3346129e60172c3f0afb39c9c702f5da7b9824ec
openstack: prefer vps-ssd-* flavors in OVH

OVH has effectively two price tiers for VM flavors, which could be given the
unofficial descriptive names "El Cheapo" and "Regular".

Under the flavor scheme we are currently using the "El Cheapo" flavors are
those that match the regular expression '^vps-ssd-' (just three flavors); all
others are "Regular".

Prefer the "El Cheapo" flavors over "Regular" flavors when the selection
criteria yields matches in both OVH price tiers.

For OpenStack providers other than OVH, the behavior should not change.

In addition to the above, this patch removes duplication of the regular
expression used for selecting OpenStack flavors. While it's convenient not to
have to change the regular expression in three or more places, this comes with
a disadvantage: the patch removes "flavor-select-regexp" from .teuthology.yaml,
so it is no longer possible to adjust the flavor-selection heuristics by
editing the configuration file. Such adjustment _must_ be done by modifying
__flavor_wrapper(). This is not really a loss, though, because - as the OVH
case demonstrates - a single regular expression match may not be enough to
select the least expensive flavor matching the selection criteria.

Fixes: https://github.com/SUSE/teuthology/issues/75
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
teuthology/openstack/__init__.py
teuthology/openstack/__init__.py
teuthology/openstack/setup-openstack.sh
teuthology/openstack/test/test_openstack.py
teuthology/provision/openstack.py
teuthology/task/buildpackages.py