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.
https://gerrit.beaker-project.org/#/c/5491/
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.
Beaker 24.0 has been released.