From 2129f8ea3d80ed25ff432a2a0a20980ed7986191 Mon Sep 17 00:00:00 2001 From: Dylan Murphy Date: Thu, 9 Jun 2022 16:34:07 -0400 Subject: [PATCH] Set libvirt cgroup path to openstack-helm/ if hugepages is enabled on system Change-Id: If4a28356162027536a84c64b2ebc00988551161d --- tools/deployment/component/common/openstack.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/deployment/component/common/openstack.sh b/tools/deployment/component/common/openstack.sh index 29ff21b4d7..3bf31f5355 100755 --- a/tools/deployment/component/common/openstack.sh +++ b/tools/deployment/component/common/openstack.sh @@ -79,6 +79,13 @@ if [ "x$(systemd-detect-virt)" != "xnone" ]; then OSH_EXTRA_HELM_VIRT_ARGS=( "--set nova.conf.nova.libvirt.virt_type=qemu" \ "--set nova.conf.nova.libvirt.cpu_mode=none" ) fi + +# Check if Hugepages is enabled +hgpgs_available="$(awk '/HugePages_Total/{print $2}' /proc/meminfo)" +if [ "x$hgpgs_available" != "x0" ]; then + OSH_EXTRA_HELM_ARGS_LIBVIRT_CGROUP="--set libvirt.conf.kubernetes.cgroup=." +fi + echo "helm installing openstack..." helm upgrade --install $release openstack/ \ ${OSH_EXTRA_HELM_ARGS_MARIADB} \ @@ -92,6 +99,7 @@ helm upgrade --install $release openstack/ \ ${OSH_EXTRA_HELM_ARGS_NOVA} \ ${OSH_EXTRA_HELM_ARGS_PLACEMENT} \ ${OSH_EXTRA_HELM_ARGS_NEUTRON} \ + ${OSH_EXTRA_HELM_ARGS_LIBVIRT_CGROUP} \ ${OSH_EXTRA_HELM_VIRT_ARGS} \ ${OSH_EXTRA_HELM_ARGS} \ --set nova.bootstrap.wait_for_computes.enabled=true \