Set flavor's page size to ANY so libvirt driver might
try to find large pages for guest RAM (either 2Mb or 1Gb),
otherwise fallback to small pages.
JIRA: FUNCTEST-684
Change-Id: I40f415ca9487c4f20416d45462eddc769df0cb9c
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
# Check if flavor exists
-if [[ -z $(nova flavor-list|grep $flavor) ]]; then
+if [[ -z $(openstack flavor list -f value -c Name | fgrep -x $flavor) ]]; then
# if given flavor doesn't exist, we create one
debug "Flavor $flavor doesn't exist. Creating a new flavor."
- nova flavor-create --is-public false ${flavor} auto 512 1 1 --is-public True
+ openstack flavor create ${flavor} --id auto --ram 512 --disk 1 --vcpus 1
+ openstack flavor set ${flavor} --property hw:mem_page_size=any
fi
debug "Using flavor $flavor to boot the instances."