tripleo-heat-templates/deployment/openvswitch/openvswitch-dpdk-baremetal-ansible.yaml
vcandapp 7c3f9f1a83 Remove OvsDpdkDriverType
Configuration of DPDK driver is not supported and hence
removing it from templates

Change-Id: I67a4fa453a27d3b65f4861e27b5caff63983a72f
2022-04-04 10:15:22 +00:00

267 lines
10 KiB
YAML

heat_template_version: wallaby
description: >
Open vSwitch Configuration
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. Use
parameter_merge_strategies to merge it with the defaults.
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
NovaLiveMigrationPermitPostCopy:
description: >
If "True" activates the instance on the destination node before migration is complete,
and to set an upper bound on the memory that needs to be transferred. Post copy
gets enabled per default if the compute roles is not a realtime role or disabled
by this parameter.
default: true
type: boolean
tags:
- role_specific
OvsDpdkCoreList:
description: >
List of cores to be used for DPDK lcore threads. Note, these threads
are used by the OVS control path for validator and handling functions.
type: string
constraints:
- allowed_pattern: "[0-9,-]*"
default: ""
tags:
- role_specific
OvsHandlerCores:
description: >
Number of cores to be used for ovs handler threads.
type: string
default: ""
tags:
- role_specific
OvsRevalidatorCores:
description: >
Number of cores to be used for ovs revalidator threads.
type: string
default: ""
tags:
- role_specific
OvsDpdkMemoryChannels:
description: Number of memory channels per socket to be used for DPDK
type: string
constraints:
- allowed_pattern: "[0-9]*"
default: "4"
tags:
- role_specific
OvsDpdkSocketMemory:
default: ""
description: >
Sets the amount of hugepage memory to assign per NUMA node. It is
recommended to use the socket closest to the PCIe slot used for the
desired DPDK NIC. The format should be in "<socket 0 mem>, <socket 1
mem>, <socket n mem>", where the value is specified in MB. For example:
"1024,0".
type: string
tags:
- role_specific
OvsPmdCoreList:
description: >
A list or range of CPU cores for PMD threads to be pinned to. Note, NIC
location to cores on socket, number of hyper-threaded logical cores, and
desired number of PMD threads can all play a role in configuring this
setting. These cores should be on the same socket where
OvsDpdkSocketMemory is assigned. If using hyperthreading then specify
both logical cores that would equal the physical core. Also, specifying
more than one core will trigger multiple PMD threads to be spawned which
may improve dataplane performance.
constraints:
- allowed_pattern: "[0-9,-]*"
type: string
default: ""
tags:
- role_specific
OvsPmdAutoLb:
default: false
description: |
Configure DPDK OVS PMD Auto Load Balance.
type: boolean
tags:
- role_specific
OvsPmdLoadThreshold:
description: >
Minimum PMD thread load threshold. Its a string with a number
in range 0 to 100, specifies the minimum PMD thread load threshold
(% of used cycles) of any non-isolated PMD threads when a PMD Auto Load
Balance may be triggered.
constraints:
- allowed_pattern: "[0-9]*"
type: string
default: ""
tags:
- role_specific
OvsPmdImprovementThreshold:
description: >
PMD load variance improvement threshold. Its a string with a number
in range 0 to 100, specifies the minimum evaluated % improvement in
load distribution across the non-isolated PMD threads that will allow a
PMD Auto Load Balance to occur.
Note, setting this parameter to 0 will always allow an auto load balance
to occur regardless of estimated improvement or not.
constraints:
- allowed_pattern: "[0-9]*"
type: string
default: ""
tags:
- role_specific
OvsPmdRebalInterval:
description: >
PMD auto load balancing interval, Its a string with a number in range
0 to 20,000, specifies the minimum time (in minutes) between 2
consecutive PMD Auto Load Balancing iterations.
constraints:
- allowed_pattern: "[0-9]*"
type: string
default: ""
tags:
- role_specific
OvsDisableEMC:
default: false
description: |
Disable OVS Exact Match Cache.
type: boolean
tags:
- role_specific
OvsDpdkEnableTSO:
description: |
Enable TSO in OVS DPDK datapath.
type: boolean
default: false
tags:
- role_specific
DdpPackage:
default: "ddp"
description: >
DDP package type. Provides the option to deploy overcloud with the required DDP package type.
type: string
tags:
- role_specific
conditions:
is_realtime:
equals: [{get_param: [RoleParameters, TunedProfileName]}, 'realtime-virtual-host']
resources:
RoleParametersDpdk:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- lcore: OvsDpdkCoreList
pmd: OvsPmdCoreList
memory_channels: OvsDpdkMemoryChannels
socket_mem: OvsDpdkSocketMemory
disable_emc: OvsDisableEMC
enable_tso: OvsDpdkEnableTSO
revalidator: OvsRevalidatorCores
handler: OvsHandlerCores
pmd_auto_lb: OvsPmdAutoLb
pmd_load_threshold: OvsPmdLoadThreshold
pmd_improvement_threshold: OvsPmdImprovementThreshold
pmd_rebal_interval: OvsPmdRebalInterval
nova_postcopy: NovaLiveMigrationPermitPostCopy
ddp_package: DdpPackage
- values: {get_param: [RoleParameters]}
- values:
OvsDpdkCoreList: {get_param: OvsDpdkCoreList}
OvsDpdkMemoryChannels: {get_param: OvsDpdkMemoryChannels}
OvsDpdkSocketMemory: {get_param: OvsDpdkSocketMemory}
OvsPmdCoreList: {get_param: OvsPmdCoreList}
OvsDisableEMC: {get_param: OvsDisableEMC}
OvsDpdkEnableTSO: {get_param: OvsDpdkEnableTSO}
OvsRevalidatorCores: {get_param: OvsRevalidatorCores}
OvsHandlerCores: {get_param: OvsHandlerCores}
OvsPmdAutoLb: {get_param: OvsPmdAutoLb}
OvsPmdLoadThreshold: {get_param: OvsPmdLoadThreshold}
OvsPmdImprovementThreshold: {get_param: OvsPmdImprovementThreshold}
OvsPmdRebalInterval: {get_param: OvsPmdRebalInterval}
NovaLiveMigrationPermitPostCopy: {get_param: NovaLiveMigrationPermitPostCopy}
DdpPackage: {get_param: DdpPackage}
BootParams:
type: ./../kernel/kernel-boot-params-baremetal-ansible.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the Open vSwitch service.
value:
service_name: openvswitch
deploy_steps_tasks:
- - name: Ddp packages and select the package
vars:
ddp_package: {get_attr: [RoleParametersDpdk, value, ddp_package]}
block:
- name: Gets latest version of required Ddp package
shell: "ls --sort=version -r /lib/firmware/intel/ice/{{ ddp_package }}/ice[_-]?*.pkg"
register: ddp_package_files
- name: ddp package selection
vars:
ddp_package_file: "{{ ddp_package_files.stdout.split('\n')[0] }}"
shell: |
rm -f /lib/firmware/intel/ice/ddp/ice.pkg
ln -s {{ ddp_package_file }} /lib/firmware/intel/ice/ddp/ice.pkg
dracut -f
rmmod ice
modprobe ice
when: ddp_package_files is defined and ddp_package_file|string != ""
when: step|int == 0 and ddp_package|string != "ddp"
- get_attr: [BootParams, role_data, deploy_steps_tasks]
- - name: Run ovs-dpdk role
when: step|int == 0
include_role:
name: tripleo_ovs_dpdk
vars:
tripleo_ovs_dpdk_pmd_core_list: {get_attr: [RoleParametersDpdk, value, pmd]}
tripleo_ovs_dpdk_lcore_list: {get_attr: [RoleParametersDpdk, value, lcore]}
tripleo_ovs_dpdk_memory_channels: {get_attr: [RoleParametersDpdk, value, memory_channels]}
tripleo_ovs_dpdk_socket_memory: {get_attr: [RoleParametersDpdk, value, socket_mem]}
tripleo_ovs_dpdk_revalidator_cores: {get_attr: [RoleParametersDpdk, value, revalidator]}
tripleo_ovs_dpdk_handler_cores: {get_attr: [RoleParametersDpdk, value, handler]}
tripleo_ovs_dpdk_pmd_auto_lb: {get_attr: [RoleParametersDpdk, value, pmd_auto_lb]}
tripleo_ovs_dpdk_pmd_load_threshold: {get_attr: [RoleParametersDpdk, value, pmd_load_threshold]}
tripleo_ovs_dpdk_pmd_improvement_threshold: {get_attr: [RoleParametersDpdk, value, pmd_improvement_threshold]}
tripleo_ovs_dpdk_pmd_rebal_interval: {get_attr: [RoleParametersDpdk, value, pmd_rebal_interval]}
tripleo_ovs_dpdk_emc_insertion_probablity:
if:
- {get_param: OvsDisableEMC}
- 0
tripleo_ovs_dpdk_enable_tso: {get_attr: [RoleParametersDpdk, value, enable_tso]}
tripleo_ovs_dpdk_vhost_postcopy_support:
if:
- is_realtime
- false
- {get_attr: [RoleParametersDpdk, value, nova_postcopy]}