Enable/disable vswitch or pci irq affinity agent
Enables or disable vswitch or pci irq affinity agent based on the host labels. If openstack label is not assigned to the host then the pci irq affinity agent is disabled. If the vswitch label is not assigned to the host then vswitch is disabled. Story: 2009702 Task: 44032 Depends-On: https://review.opendev.org/c/starlingx/config/+/818599 Signed-off-by: Iago Estrela <IagoFilipe.EstrelaBarros@windriver.com> Change-Id: I77166fc3bf084ed70ef0c2a7c1f04350a0357b9e
This commit is contained in:
parent
40893d5787
commit
42dc7f4c38
|
@ -4,11 +4,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
class platform::pciirqaffinity::params (
|
||||
$openstack_enabled,
|
||||
$openstack_auth_host,
|
||||
$openstack_user_domain,
|
||||
$openstack_project_domain,
|
||||
$openstack_keyring_service,
|
||||
$enabled,
|
||||
$rabbit_host,
|
||||
$rabbit_port,
|
||||
$rabbit_userid,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class platform::vswitch::params(
|
||||
$enabled = true,
|
||||
$iommu_enabled = true,
|
||||
$hugepage_dir = '/mnt/huge-1048576kB',
|
||||
$driver_type = 'vfio-pci',
|
||||
|
@ -11,15 +12,14 @@ class platform::vswitch
|
|||
|
||||
Class[$name] -> Class['::platform::network']
|
||||
|
||||
if $::platform::params::vswitch_type != 'none' {
|
||||
if $::platform::params::vswitch_type != 'none' and $enabled {
|
||||
$enable_unsafe_noiommu_mode = bool2num(!$iommu_enabled)
|
||||
exec {'vfio-iommu-mode':
|
||||
command => "echo ${enable_unsafe_noiommu_mode} > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode",
|
||||
require => Kmod::Load[$driver_type],
|
||||
}
|
||||
include $vswitch_class
|
||||
}
|
||||
|
||||
include $vswitch_class
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue