fuel-plugin-virtual-accelerator: keep apparmor libvirt profile
This commit changes the hugepages mount point chosen by virtual accelerator in order to use one authorized by apparmor for libvirt (/dev/hugepages). Thanks to this patch we can now keep the apparmor libvirt profile. Change-Id: I27eb4841f7e8350c234a0b11a28b363704bf22e9 Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com>
This commit is contained in:
parent
e4e6a66696
commit
773111dacf
|
@ -5,14 +5,6 @@ class virtual_accelerator::config inherits virtual_accelerator {
|
|||
|
||||
$advanced_params = $virtual_accelerator::advanced_params
|
||||
|
||||
file { '/etc/apparmor.d/disable/usr.sbin.libvirtd':
|
||||
ensure => 'link',
|
||||
target => '/etc/apparmor.d/usr.sbin.libvirtd',
|
||||
} ->
|
||||
exec {'disable_apparmor':
|
||||
command => "apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd",
|
||||
returns => [0, 254],
|
||||
} ->
|
||||
file { '/etc/init/cpu-cgroup.conf':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
@ -24,6 +16,15 @@ class virtual_accelerator::config inherits virtual_accelerator {
|
|||
}
|
||||
|
||||
$fp_conf_file = "/usr/local/etc/fast-path.env"
|
||||
$hugepages_dir = "/dev/hugepages"
|
||||
|
||||
exec { 'copy_template':
|
||||
command => "cp /usr/local/etc/fast-path.env.tmpl ${fp_conf_file}",
|
||||
} ->
|
||||
exec { 'set_hugepages_dir':
|
||||
command => "config_va.sh HUGEPAGES_DIR ${hugepages_dir}",
|
||||
path => '/usr/local/bin/',
|
||||
}
|
||||
|
||||
if $advanced_params == true {
|
||||
$custom_conf_file = $virtual_accelerator::va_conf_file
|
||||
|
@ -42,9 +43,6 @@ class virtual_accelerator::config inherits virtual_accelerator {
|
|||
$vm_mem = $virtual_accelerator::vm_mem
|
||||
$fp_mem = $virtual_accelerator::fp_mem
|
||||
|
||||
exec { 'copy_template':
|
||||
command => "cp /usr/local/etc/fast-path.env.tmpl ${fp_conf_file}",
|
||||
} ->
|
||||
exec { 'set_vm_mem':
|
||||
command => "config_va.sh VM_MEMORY ${vm_mem}",
|
||||
path => '/usr/local/bin/',
|
||||
|
|
Loading…
Reference in New Issue