Move hugepages mount point to apparmor profile good location
This commit is contained in:
parent
cf38035f49
commit
08b313f318
@ -812,7 +812,7 @@ def install_hugepages():
|
|||||||
hugepages = int((mem.total * hugepage_multiplier) / hugepage_size)
|
hugepages = int((mem.total * hugepage_multiplier) / hugepage_size)
|
||||||
else:
|
else:
|
||||||
hugepages = int(hugepage_config)
|
hugepages = int(hugepage_config)
|
||||||
mnt_point = '/mnt/huge'
|
mnt_point = '/run/hugepages/kvm'
|
||||||
hugepage_support(
|
hugepage_support(
|
||||||
'nova',
|
'nova',
|
||||||
mnt_point=mnt_point,
|
mnt_point=mnt_point,
|
||||||
|
@ -727,7 +727,7 @@ class NovaComputeUtilsTests(CharmTestCase):
|
|||||||
utils.install_hugepages()
|
utils.install_hugepages()
|
||||||
self.hugepage_support.assert_called_with(
|
self.hugepage_support.assert_called_with(
|
||||||
'nova',
|
'nova',
|
||||||
mnt_point='/mnt/huge',
|
mnt_point='/run/hugepages/kvm',
|
||||||
group='root',
|
group='root',
|
||||||
nr_hugepages=488,
|
nr_hugepages=488,
|
||||||
mount=False,
|
mount=False,
|
||||||
@ -737,7 +737,7 @@ class NovaComputeUtilsTests(CharmTestCase):
|
|||||||
call(['update-rc.d', 'qemu-hugefsdir', 'defaults']),
|
call(['update-rc.d', 'qemu-hugefsdir', 'defaults']),
|
||||||
]
|
]
|
||||||
_check_call.assert_has_calls(check_call_calls)
|
_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('psutil.virtual_memory')
|
||||||
@patch('subprocess.check_call')
|
@patch('subprocess.check_call')
|
||||||
@ -748,7 +748,7 @@ class NovaComputeUtilsTests(CharmTestCase):
|
|||||||
utils.install_hugepages()
|
utils.install_hugepages()
|
||||||
self.hugepage_support.assert_called_with(
|
self.hugepage_support.assert_called_with(
|
||||||
'nova',
|
'nova',
|
||||||
mnt_point='/mnt/huge',
|
mnt_point='/run/hugepages/kvm',
|
||||||
group='root',
|
group='root',
|
||||||
nr_hugepages=2048,
|
nr_hugepages=2048,
|
||||||
mount=False,
|
mount=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user