Set flavor's page size to support dpdk enabled vms 33/26533/1
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Tue, 27 Dec 2016 16:51:04 +0000 (20:51 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Tue, 27 Dec 2016 17:10:28 +0000 (21:10 +0400)
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>
functest/opnfv_tests/openstack/healthcheck/healthcheck.sh

index e27cf4b..57aa0c7 100755 (executable)
@@ -228,10 +228,11 @@ sleep ${wait_time}
 
 
 # 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."