summaryrefslogtreecommitdiffstats
path: root/extraconfig/pre_network
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-01-12 16:07:02 -0500
committerTim Rozet <trozet@redhat.com>2017-06-23 09:31:53 -0400
commitb30bdb6f8ed7a041d53849cd56718afd08f4bb98 (patch)
tree9d82bba21b5e2cb269a4a21bf05ea4332d535621 /extraconfig/pre_network
parent4e19c7a13e4717082f676ec5e72d35e9ea963a33 (diff)
Adds service for OVS and enables ODL DPDK deployments
In order to deploy OpenDaylight with DPDK we need to copy the DPDK config for OVS done in the neutron-ovs-dpdk service template, without enabling OVS agent for compute nodes. To do this correctly, we should inherit and openvswitch service which is a common place to set OVS configuration and parameters. Note: vswitch::dpdk config will be called in prenetwork setup with ovs_dpdk_config.yaml so there is no need to include that in the step config for neutron-ovs-dpdk-agent service or opendaylight-ovs-dpdk. Changes Include: - Creates a common openvswitch service template, which in the future will migrate to be its own service. - Renames and fixes OVS DPDK configuration heat parameters in the openvswitch template. - neutron-ovs-dpdk-agent now inherits the common openvswitch template. - Adds opendaylight-ovs-dpdk template which also inherits common ovs template. - Uses OVS DPDK config script to allow configuring OVS DPDK in prenetwork config (before os-net-config runs). This has an issue where hieradata is not present yet, so we have to redefine the heat parameters and pass them via bash. In the future this should be corrected. - Adds opendaylight-dpdk environment file used to deploy an ODL + DPDK deployment. - Updates neutron-ovs-dpdk environment file. Closes-Bug: 1656097 Partial-Bug: 1656096 Depends-On: I3227189691df85f265cf84bd4115d8d4c9f979f3 Change-Id: Ie80e38c2a9605d85cdf867a31b6888bfcae69e29 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'extraconfig/pre_network')
-rw-r--r--extraconfig/pre_network/ansible_host_config.yaml2
-rw-r--r--extraconfig/pre_network/host_config_and_reboot.yaml110
2 files changed, 90 insertions, 22 deletions
diff --git a/extraconfig/pre_network/ansible_host_config.yaml b/extraconfig/pre_network/ansible_host_config.yaml
index f4f1a14a..2d862613 100644
--- a/extraconfig/pre_network/ansible_host_config.yaml
+++ b/extraconfig/pre_network/ansible_host_config.yaml
@@ -31,7 +31,7 @@
line: 'isolated_cores={{ _TUNED_CORES_ }}'
when: _TUNED_CORES_|default("") != ""
- - name: Tune-d provile activation
+ - name: Tune-d profile activation
shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }}
become: true
when: _TUNED_PROFILE_NAME_|default("") != ""
diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml
index e4898a6e..009a0879 100644
--- a/extraconfig/pre_network/host_config_and_reboot.yaml
+++ b/extraconfig/pre_network/host_config_and_reboot.yaml
@@ -14,26 +14,81 @@ parameters:
ServiceNames:
type: comma_delimited_list
default: []
- HostCpusList:
+ IsolCpusList:
default: "0"
+ description: List of cores to be isolated by tuned
+ type: string
+ constraints:
+ - allowed_pattern: "[0-9,-]+"
+ OvsEnableDpdk:
+ default: false
+ description: Whether or not to configure enable DPDK in OVS
+ type: boolean
+ 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: ""
+ OvsDpdkMemoryChannels:
+ description: Number of memory channels per socket to be used for DPDK
+ type: string
+ constraints:
+ - allowed_pattern: "[0-9]*"
+ default: ""
+ 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
+ OvsDpdkDriverType:
+ default: "vfio-pci"
+ description: >
+ DPDK Driver type. Ensure the Overcloud NIC to be used for DPDK supports
+ this UIO/PMD driver.
+ type: string
+ 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: ""
+ # DEPRECATED: the following options are deprecated and are currently maintained
+ # for backwards compatibility. They will be removed in the Queens cycle.
+ HostCpusList:
description: List of cores to be used for host process
type: string
constraints:
- allowed_pattern: "[0-9,-]+"
+ default: '0'
NeutronDpdkCoreList:
- default: ""
description: List of cores to be used for DPDK Poll Mode Driver
type: string
constraints:
- allowed_pattern: "[0-9,-]*"
+ default: ''
NeutronDpdkMemoryChannels:
- default: ""
description: Number of memory channels to be used for DPDK
type: string
constraints:
- allowed_pattern: "[0-9]*"
+ default: ''
NeutronDpdkSocketMemory:
- default: ""
+ default: ''
description: Memory allocated for each socket
type: string
NeutronDpdkDriverType:
@@ -45,14 +100,23 @@ conditions:
is_host_config_required: {not: {equals: [{get_param: [RoleParameters, KernelArgs]}, ""]}}
# YAQL is enabled in conditions with https://review.openstack.org/#/c/467506/
is_dpdk_config_required:
- yaql:
- expression: $.data.service_names.contains('neutron_ovs_dpdk_agent')
- data:
- service_names: {get_param: ServiceNames}
+ or:
+ - yaql:
+ expression: $.data.service_names.contains('neutron_ovs_dpdk_agent')
+ data:
+ service_names: {get_param: ServiceNames}
+ - {get_param: OvsEnableDpdk}
+ - {get_param: [RoleParameters, OvsEnableDpdk]}
is_reboot_config_required:
or:
- is_host_config_required
- is_dpdk_config_required
+ l_cores_empty: {equals: [{get_param: OvsDpdkCoreList}, '']}
+ pmd_cores_empty: {equals: [{get_param: OvsPmdCoreList}, '']}
+ mem_channels_empty: {equals: [{get_param: OvsDpdkMemoryChannels}, '']}
+ socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']}
+ driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']}
+ isol_cpus_empty: {equals: [{get_param: IsolCpusList}, '0']}
resources:
RoleParametersValue:
@@ -62,16 +126,20 @@ resources:
value:
map_replace:
- map_replace:
- - HostCpusList: HostCpusList
- NeutronDpdkCoreList: NeutronDpdkCoreList
- NeutronDpdkMemoryChannels: NeutronDpdkMemoryChannels
- NeutronDpdkSocketMemory: NeutronDpdkSocketMemory
+ - IsolCpusList: IsolCpusList
+ OvsDpdkCoreList: OvsDpdkCoreList
+ OvsDpdkMemoryChannels: OvsDpdkMemoryChannels
+ OvsDpdkSocketMemory: OvsDpdkSocketMemory
+ OvsDpdkDriverType: OvsDpdkDriverType
+ OvsPmdCoreList: OvsDpdkCoreList
- values: {get_param: [RoleParameters]}
- values:
- HostCpusList: {get_param: HostCpusList}
- NeutronDpdkCoreList: {get_param: NeutronDpdkCoreList}
- NeutronDpdkMemoryChannels: {get_param: NeutronDpdkMemoryChannels}
- NeutronDpdkSocketMemory: {get_param: NeutronDpdkSocketMemory}
+ IsolCpusList: {if: [isol_cpus_empty, {get_param: HostCpusList}, {get_param: IsolCpusList}]}
+ OvsDpdkCoreList: {if: [l_cores_empty, {get_param: HostCpusList}, {get_param: OvsDpdkCoreList}]}
+ OvsDpdkMemoryChannels: {if: [mem_channels_empty, {get_param: NeutronDpdkMemoryChannels}, {get_param: OvsDpdkMemoryChannels}]}
+ OvsDpdkSocketMemory: {if: [socket_mem_empty, {get_param: NeutronDpdkSocketMemory}, {get_param: OvsDpdkSocketMemory}]}
+ OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]}
+ OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]}
HostParametersConfig:
type: OS::Heat::SoftwareConfig
@@ -98,7 +166,7 @@ resources:
input_values:
_KERNEL_ARGS_: {get_param: [RoleParameters, KernelArgs]}
_TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
- _TUNED_CORES_: {get_param: [RoleParameters, HostIsolatedCoreList]}
+ _TUNED_CORES_: {get_param: [RoleParameters, IsolCpusList]}
EnableDpdkConfig:
type: OS::Heat::SoftwareConfig
@@ -122,10 +190,10 @@ resources:
}
'
params:
- $HOST_CORES: {get_attr: [RoleParametersValue, value, HostCpusList]}
- $PMD_CORES: {get_attr: [RoleParametersValue, value, NeutronDpdkCoreList]}
- $MEMORY_CHANNELS: {get_attr: [RoleParametersValue, value, NeutronDpdkMemoryChannels]}
- $SOCKET_MEMORY: {get_attr: [RoleParametersValue, value, NeutronDpdkSocketMemory]}
+ $HOST_CORES: {get_attr: [RoleParametersValue, value, OvsDpdkCoreList]}
+ $PMD_CORES: {get_attr: [RoleParametersValue, value, OvsPmdCoreList]}
+ $MEMORY_CHANNELS: {get_attr: [RoleParametersValue, value, OvsDpdkMemoryChannels]}
+ $SOCKET_MEMORY: {get_attr: [RoleParametersValue, value, OvsDpdkSocketMemory]}
EnableDpdkDeployment:
type: OS::Heat::SoftwareDeployment