Bug 1397649 - Beaker randomly picks OpenStack flavors that are larger than necessary
Summary: Beaker randomly picks OpenStack flavors that are larger than necessary
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 24.0
Assignee: Hui Wang
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-23 04:42 UTC by Dan Callaghan
Modified: 2017-02-21 18:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-21 18:48:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2016-11-23 04:42:49 UTC
When Beaker is dynamically creating an OpenStack instance to run a recipe, it's supposed to pick the "cheapest" flavor which meets the recipe's host requirements. We approximate "cheapest" by sorting flavors in order of least to greatest RAM, and then picking the first applicable one.

However when Beaker applies host requirements in needproperty.xml filter_openstack_flavor() methods, some methods are using set() which means the ordering of the passed-in list is discarded. As a result the sorting has no effect, Beaker effectively picks any random flavor meeting the host requirements, not the one with the least RAM.

Comment 1 Hui Wang 2016-12-12 08:42:26 UTC
https://gerrit.beaker-project.org/#/c/5491/

Comment 3 Hui Wang 2016-12-22 06:02:43 UTC
Verified this issue.
The result is PASS.
Version Beaker 24.0.git.227.68bc3de 

Details:

Submit a job that has no memory host requirement.
It will take a instance with 1G memory(the cheapest one) to install in openstack.

Comment 4 Dan Callaghan 2017-02-21 18:48:36 UTC
Beaker 24.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.