From 6d57c9463e22c63f69d4786885c27fc0f8e2cf20 Mon Sep 17 00:00:00 2001 From: Bohdan Dobrelia Date: Wed, 23 Oct 2024 16:34:14 +0200 Subject: [PATCH] Launch test VM with hugepages, if requested so Signed-off-by: Bohdan Dobrelia --- docs_dev/assemblies/development_environment.adoc | 2 ++ tests/roles/development_environment/files/pre_launch.bash | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs_dev/assemblies/development_environment.adoc b/docs_dev/assemblies/development_environment.adoc index 89b1fdd71..192b219bc 100644 --- a/docs_dev/assemblies/development_environment.adoc +++ b/docs_dev/assemblies/development_environment.adoc @@ -158,6 +158,8 @@ EDPM_COMPUTE_CEPH_ENABLED=false TLS_ENABLED=true DNS_DOMAIN=ooo.test make standa This will disable the Ceph deployment, as the CI is not deploying with Ceph. +To configure hugepages, use `EDPM_CONFIGURE_HUGEPAGES=true`. + === Snapshot/revert When the deployment of the Standalone OpenStack is finished, it's a diff --git a/tests/roles/development_environment/files/pre_launch.bash b/tests/roles/development_environment/files/pre_launch.bash index aee63b267..41e9dcb70 100755 --- a/tests/roles/development_environment/files/pre_launch.bash +++ b/tests/roles/development_environment/files/pre_launch.bash @@ -32,8 +32,12 @@ ${BASH_ALIASES[openstack]} image show cirros || \ ${BASH_ALIASES[openstack]} image create --container-format bare --disk-format $DISK_FORMAT cirros < /tmp/$RAW # Create flavor +HPARGS=" " +if [ "${EDPM_CONFIGURE_HUGEPAGES:-false}" = "true" ] ; then + HPARGS="set huge_pages --property hw:mem_page_size=2MB" +fi ${BASH_ALIASES[openstack]} flavor show m1.small || \ - ${BASH_ALIASES[openstack]} flavor create set huge_pages --property hw:mem_page_size=2MB--ram 512 --vcpus 1 --disk 1 --ephemeral 1 m1.small + ${BASH_ALIASES[openstack]} flavor create $HPARGS --ram 512 --vcpus 1 --disk 1 --ephemeral 1 m1.small # Create networks ${BASH_ALIASES[openstack]} network show private || ${BASH_ALIASES[openstack]} network create private --share