From 08b313f318282b465792518135b6f93fdad99fd3 Mon Sep 17 00:00:00 2001 From: James Page Date: Thu, 13 Aug 2015 15:39:13 +0100 Subject: [PATCH] Move hugepages mount point to apparmor profile good location --- hooks/nova_compute_utils.py | 2 +- unit_tests/test_nova_compute_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/nova_compute_utils.py b/hooks/nova_compute_utils.py index 73544f4b..5cb5741c 100644 --- a/hooks/nova_compute_utils.py +++ b/hooks/nova_compute_utils.py @@ -812,7 +812,7 @@ def install_hugepages(): hugepages = int((mem.total * hugepage_multiplier) / hugepage_size) else: hugepages = int(hugepage_config) - mnt_point = '/mnt/huge' + mnt_point = '/run/hugepages/kvm' hugepage_support( 'nova', mnt_point=mnt_point, diff --git a/unit_tests/test_nova_compute_utils.py b/unit_tests/test_nova_compute_utils.py index d8d8a075..1988fad7 100644 --- a/unit_tests/test_nova_compute_utils.py +++ b/unit_tests/test_nova_compute_utils.py @@ -727,7 +727,7 @@ class NovaComputeUtilsTests(CharmTestCase): utils.install_hugepages() self.hugepage_support.assert_called_with( 'nova', - mnt_point='/mnt/huge', + mnt_point='/run/hugepages/kvm', group='root', nr_hugepages=488, mount=False, @@ -737,7 +737,7 @@ class NovaComputeUtilsTests(CharmTestCase): call(['update-rc.d', 'qemu-hugefsdir', 'defaults']), ] _check_call.assert_has_calls(check_call_calls) - self.fstab_mount.assert_called_with('/mnt/huge') + self.fstab_mount.assert_called_with('/run/hugepages/kvm') @patch('psutil.virtual_memory') @patch('subprocess.check_call') @@ -748,7 +748,7 @@ class NovaComputeUtilsTests(CharmTestCase): utils.install_hugepages() self.hugepage_support.assert_called_with( 'nova', - mnt_point='/mnt/huge', + mnt_point='/run/hugepages/kvm', group='root', nr_hugepages=2048, mount=False,