Create hugepage mountpoints where openstack-helm expects it.
By default, libvirt and openstack-helm expect the hugepage mountpoints to be under /dev, while we currently use mountpoints under /mnt. To get containerized libvirt working, add a set of mountpoints under /dev. Later on we can switch our existing code over to use the new mountpoints and remove the mounts under /mnt. Just to make things interesting, the libvirt helm chart also expects the default hugepage size (2M in our case) to be mounted at /dev/hugepages, so we add another mountpoint for that pagesize. Ideally we'd upstream a helm chart change to auto-detect the mountpoint, at which time we could remove this hack. Change-Id: I88baa169dd357e73295aa32f4044da35e3a7fd6a Story: 2003909 Task: 27081 Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
This commit is contained in:
parent
cc447124c2
commit
2b82117b33
|
@ -114,6 +114,8 @@ class platform::compute::hugetlbf {
|
|||
$hugemnt ="/mnt/huge-$page_size"
|
||||
$options = "pagesize=${page_size}"
|
||||
|
||||
# TODO: Once all the code is switched over to use the /dev
|
||||
# mount point we can get rid of this mount point.
|
||||
notice("Mounting hugetlbfs at: $hugemnt")
|
||||
exec { "create $hugemnt":
|
||||
command => "mkdir -p ${hugemnt}",
|
||||
|
@ -128,6 +130,49 @@ class platform::compute::hugetlbf {
|
|||
atboot => 'yes',
|
||||
remounts => true,
|
||||
}
|
||||
|
||||
# The libvirt helm chart expects hugepages to be mounted
|
||||
# under /dev so let's do that.
|
||||
$hugemnt2 ="/dev/huge-$page_size"
|
||||
notice("Mounting hugetlbfs at: $hugemnt2")
|
||||
file { "${hugemnt2}":
|
||||
ensure => 'directory',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}->
|
||||
mount { "${hugemnt2}":
|
||||
name => "${hugemnt2}",
|
||||
device => 'none',
|
||||
fstype => 'hugetlbfs',
|
||||
ensure => 'mounted',
|
||||
options => "${options}",
|
||||
atboot => 'yes',
|
||||
remounts => true,
|
||||
}
|
||||
}
|
||||
|
||||
# The libvirt helm chart also assumes that the default hugepage size
|
||||
# will be mounted at /dev/hugepages so let's make that happen too.
|
||||
# Once we upstream a fix to the helm chart to automatically determine
|
||||
# the mountpoint then we can remove this.
|
||||
$page_size = '2M'
|
||||
$hugemnt ="/dev/hugepages"
|
||||
$options = "pagesize=${page_size}"
|
||||
|
||||
notice("Mounting hugetlbfs at: $hugemnt")
|
||||
exec { "create $hugemnt":
|
||||
command => "mkdir -p ${hugemnt}",
|
||||
onlyif => "test ! -d ${hugemnt}",
|
||||
} ->
|
||||
mount { "${hugemnt}":
|
||||
name => "${hugemnt}",
|
||||
device => 'none',
|
||||
fstype => 'hugetlbfs',
|
||||
ensure => 'mounted',
|
||||
options => "${options}",
|
||||
atboot => 'yes',
|
||||
remounts => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue