Merge "Adds service for OVS and enables ODL DPDK deployments"

This commit is contained in:
Jenkins 2017-06-27 18:09:24 +00:00 committed by Gerrit Code Review
commit 41f0472c22
10 changed files with 395 additions and 143 deletions

View File

@ -0,0 +1,37 @@
# A Heat environment that can be used to deploy OpenDaylight with L3 DVR and DPDK
resource_registry:
OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
OS::TripleO::Services::ComputeNeutronCorePlugin: OS::Heat::None
OS::TripleO::Services::OpenDaylightApi: ../puppet/services/opendaylight-api.yaml
OS::TripleO::Services::OpenDaylightOvs: ../puppet/services/opendaylight-ovs.yaml
OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
parameter_defaults:
NeutronEnableForceMetadata: true
NeutronMechanismDrivers: 'opendaylight_v2'
NeutronServicePlugins: 'odl-router_v2'
NovaSchedulerDefaultFilters: "RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter"
## Deploying DPDK requires enabling hugepages for the overcloud compute nodes.
## It also requires enabling IOMMU when using the VFIO (vfio-pci) OvsDpdkDriverType.
## This can be done using ComputeKernelArgs as shown below.
ComputeParameters:
#ComputeKernelArgs: "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048"
## Attempting to deploy DPDK without appropriate values for the below parameters may lead to unstable deployments
## due to CPU contention of DPDK PMD threads.
OvsEnableDpdk: True
## It is highly recommended to to enable isolcpus (via ComputeKernelArgs) on compute overcloud nodes and set the following parameters:
#OvsDpdkSocketMemory: "" # 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. Format should be comma separated per socket string such as:
# "<socket 0 mem MB>,<socket 1 mem MB>", for example: "1024,0".
#OvsDpdkDriverType: "vfio-pci" # Ensure the Overcloud NIC to be used for DPDK supports this UIO/PMD driver.
#OvsPmdCoreList: "" # 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.
#NovaVcpuPinSet: "" # Cores to pin Nova instances to. For maximum performance, select cores
# on the same NUMA node(s) selected for previous settings.

View File

@ -1,18 +1,31 @@
## A Heat environment that can be used to deploy DPDK with OVS
# A Heat environment that can be used to deploy DPDK with OVS
# Deploying DPDK requires enabling hugepages for the overcloud nodes
resource_registry:
OS::TripleO::Services::ComputeNeutronOvsAgent: ../puppet/services/neutron-ovs-dpdk-agent.yaml
parameter_defaults:
## NeutronDpdkCoreList and NeutronDpdkMemoryChannels are REQUIRED settings.
## Attempting to deploy DPDK without appropriate values will cause deployment to fail or lead to unstable deployments.
#NeutronDpdkCoreList: ""
#NeutronDpdkMemoryChannels: ""
NeutronDatapathType: "netdev"
NeutronVhostuserSocketDir: "/var/lib/vhost_sockets"
#NeutronDpdkSocketMemory: ""
#NeutronDpdkDriverType: "vfio-pci"
#NovaReservedHostMemory: 4096
#NovaVcpuPinSet: ""
NovaSchedulerDefaultFilters: "RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter"
## Deploying DPDK requires enabling hugepages for the overcloud compute nodes.
## It also requires enabling IOMMU when using the VFIO (vfio-pci) OvsDpdkDriverType.
## This can be done using ComputeKernelArgs as shown below.
#ComputeParameters:
#ComputeKernelArgs: "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048"
## Attempting to deploy DPDK without appropriate values for the below parameters may lead to unstable deployments
## due to CPU contention of DPDK PMD threads.
## It is highly recommended to to enable isolcpus (via ComputeKernelArgs) on compute overcloud nodes and set the following parameters:
#OvsDpdkSocketMemory: "" # 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. Format should be comma separated per socket string such as:
# "<socket 0 mem MB>,<socket 1 mem MB>", for example: "1024,0".
#OvsDpdkDriverType: "vfio-pci" # Ensure the Overcloud NIC to be used for DPDK supports this UIO/PMD driver.
#OvsPmdCoreList: "" # 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.
#NovaVcpuPinSet: "" # Cores to pin Nova instances to. For maximum performance, select cores
# on the same NUMA node(s) selected for previous settings.

View File

@ -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("") != ""

View File

@ -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:
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

View File

@ -92,8 +92,12 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
OpenVswitchUpgrade:
type: ./openvswitch-upgrade.yaml
Ovs:
type: ./openvswitch.yaml
properties:
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
outputs:
role_data:
@ -138,7 +142,7 @@ outputs:
expression: $.data.ovs_upgrade + $.data.neutron_ovs_upgrade
data:
ovs_upgrade:
get_attr: [OpenVswitchUpgrade, role_data, upgrade_tasks]
get_attr: [Ovs, role_data, upgrade_tasks]
neutron_ovs_upgrade:
- name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled neutron-openvswitch-agent

View File

@ -26,32 +26,6 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
HostCpusList:
default: "0"
description: List of cores to be used for host process
type: string
constraints:
- allowed_pattern: "[0-9,-]+"
NeutronDpdkCoreList:
default: ""
description: List of cores to be used for DPDK Poll Mode Driver
type: string
constraints:
- allowed_pattern: "[0-9,-]*"
NeutronDpdkMemoryChannels:
default: ""
description: Number of memory channels to be used for DPDK
type: string
constraints:
- allowed_pattern: "[0-9]*"
NeutronDpdkSocketMemory:
default: ""
description: Memory allocated for each socket
type: string
NeutronDpdkDriverType:
default: "vfio-pci"
description: DPDK Driver type
type: string
# below parameters has to be set in neutron agent only for compute nodes.
# as of now there is no other usecase for these parameters except dpdk.
# should be moved to compute only ovs agent in case of any other usecases.
@ -75,9 +49,6 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
OpenVswitchUpgrade:
type: ./openvswitch-upgrade.yaml
# Merging role-specific parameters (RoleParameters) with the default parameters.
# RoleParameters will have the precedence over the default parameters.
RoleParametersValue:
@ -89,20 +60,19 @@ resources:
- map_replace:
- neutron::agents::ml2::ovs::datapath_type: NeutronDatapathType
neutron::agents::ml2::ovs::vhostuser_socket_dir: NeutronVhostuserSocketDir
vswitch::dpdk::driver_type: NeutronDpdkDriverType
vswitch::dpdk::host_core_list: HostCpusList
vswitch::dpdk::pmd_core_list: NeutronDpdkCoreList
vswitch::dpdk::memory_channels: NeutronDpdkMemoryChannels
vswitch::dpdk::socket_mem: NeutronDpdkSocketMemory
- values: {get_param: [RoleParameters]}
- values:
NeutronDatapathType: {get_param: NeutronDatapathType}
NeutronVhostuserSocketDir: {get_param: NeutronVhostuserSocketDir}
NeutronDpdkDriverType: {get_param: NeutronDpdkDriverType}
HostCpusList: {get_param: HostCpusList}
NeutronDpdkCoreList: {get_param: NeutronDpdkCoreList}
NeutronDpdkMemoryChannels: {get_param: NeutronDpdkMemoryChannels}
NeutronDpdkSocketMemory: {get_param: NeutronDpdkSocketMemory}
Ovs:
type: ./openvswitch.yaml
properties:
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@ -116,7 +86,8 @@ outputs:
- keys:
tripleo.neutron_ovs_agent.firewall_rules: tripleo.neutron_ovs_dpdk_agent.firewall_rules
- neutron::agents::ml2::ovs::enable_dpdk: true
- get_attr: [Ovs, role_data, config_settings]
- get_attr: [RoleParametersValue, value]
step_config: {get_attr: [NeutronOvsAgent, role_data, step_config]}
upgrade_tasks:
get_attr: [OpenVswitchUpgrade, role_data, upgrade_tasks]
get_attr: [Ovs, role_data, upgrade_tasks]

View File

@ -57,8 +57,14 @@ parameters:
type: json
resources:
OpenVswitchUpgrade:
type: ./openvswitch-upgrade.yaml
Ovs:
type: ./openvswitch.yaml
properties:
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@ -66,7 +72,8 @@ outputs:
value:
service_name: opendaylight_ovs
config_settings:
opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
map_merge:
- opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
opendaylight::username: {get_param: OpenDaylightUsername}
opendaylight::password: {get_param: OpenDaylightPassword}
opendaylight_check_url: {get_param: OpenDaylightCheckURL}
@ -79,6 +86,7 @@ outputs:
dport: 4789
'136 neutron gre networks':
proto: 'gre'
- get_attr: [Ovs, role_data, config_settings]
step_config: |
include tripleo::profile::base::neutron::plugins::ovs::opendaylight
upgrade_tasks:
@ -86,7 +94,7 @@ outputs:
expression: $.data.ovs_upgrade + $.data.opendaylight_upgrade
data:
ovs_upgrade:
get_attr: [OpenVswitchUpgrade, role_data, upgrade_tasks]
get_attr: [Ovs, role_data, upgrade_tasks]
opendaylight_upgrade:
- name: Check if openvswitch is deployed
command: systemctl is-enabled openvswitch

View File

@ -1,50 +0,0 @@
heat_template_version: pike
description: >
Openvswitch package special handling for upgrade.
outputs:
role_data:
description: Upgrade task for special handling of Openvswitch (OVS) upgrade.
value:
service_name: openvswitch_upgrade
upgrade_tasks:
- name: Check openvswitch version.
tags: step2
register: ovs_version
ignore_errors: true
shell: rpm -qa | awk -F- '/^openvswitch-2/{print $2 "-" $3}'
- name: Check openvswitch packaging.
tags: step2
shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
register: ovs_packaging_issue
ignore_errors: true
- block:
- name: "Ensure empty directory: emptying."
file:
state: absent
path: /root/OVS_UPGRADE
- name: "Ensure empty directory: creating."
file:
state: directory
path: /root/OVS_UPGRADE
owner: root
group: root
mode: 0750
- name: Download OVS packages.
command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch
- name: Get rpm list for manual upgrade of OVS.
shell: ls -1 /root/OVS_UPGRADE/*.rpm
register: ovs_list_of_rpms
- name: Manual upgrade of OVS
shell: |
rpm -U --test {{item}} 2>&1 | grep "already installed" || \
rpm -U --replacepkgs --notriggerun --nopostun {{item}};
args:
chdir: /root/OVS_UPGRADE
with_items:
- "{{ovs_list_of_rpms.stdout_lines}}"
tags: step2
when: "'2.5.0-14' in '{{ovs_version.stdout}}'
or
ovs_packaging_issue|succeeded"

View File

@ -0,0 +1,178 @@
heat_template_version: pike
description: >
Open vSwitch Configuration
parameters:
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
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
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: ''
NeutronDpdkCoreList:
description: List of cores to be used for DPDK Poll Mode Driver
type: string
constraints:
- allowed_pattern: "[0-9,-]*"
default: ''
NeutronDpdkMemoryChannels:
description: Number of memory channels to be used for DPDK
type: string
constraints:
- allowed_pattern: "[0-9]*"
default: ''
NeutronDpdkSocketMemory:
default: ''
description: Memory allocated for each socket
type: string
NeutronDpdkDriverType:
default: "vfio-pci"
description: DPDK Driver type
type: string
parameter_groups:
- label: deprecated
description: Do not use deprecated params, they will be removed.
parameters:
- HostCpusList
- NeutronDpdkCoreList
- NeutronDpdkMemoryChannels
- NeutronDpdkSocketMemory
- NeutronDpdkDriverType
conditions:
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']}
outputs:
role_data:
description: Role data for the Open vSwitch service.
value:
service_name: openvswitch
config_settings:
map_replace:
- map_replace:
- vswitch::dpdk::driver_type: OvsDpdkDriverType
vswitch::dpdk::host_core_list: OvsDpdkCoreList
vswitch::dpdk::pmd_core_list: OvsPmdCoreList
vswitch::dpdk::memory_channels: OvsDpdkMemoryChannels
vswitch::dpdk::socket_mem: OvsDpdkSocketMemory
- values: {get_param: [RoleParameters]}
- values:
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}]}
upgrade_tasks:
- name: Check openvswitch version.
tags: step2
register: ovs_version
ignore_errors: true
shell: rpm -qa | awk -F- '/^openvswitch-2/{print $2 "-" $3}'
- name: Check openvswitch packaging.
tags: step2
shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
register: ovs_packaging_issue
ignore_errors: true
- block:
- name: "Ensure empty directory: emptying."
file:
state: absent
path: /root/OVS_UPGRADE
- name: "Ensure empty directory: creating."
file:
state: directory
path: /root/OVS_UPGRADE
owner: root
group: root
mode: 0750
- name: Download OVS packages.
command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch
- name: Get rpm list for manual upgrade of OVS.
shell: ls -1 /root/OVS_UPGRADE/*.rpm
register: ovs_list_of_rpms
- name: Manual upgrade of OVS
shell: |
rpm -U --test {{item}} 2>&1 | grep "already installed" || \
rpm -U --replacepkgs --notriggerun --nopostun {{item}};
args:
chdir: /root/OVS_UPGRADE
with_items:
- "{{ovs_list_of_rpms.stdout_lines}}"
tags: step2
when: "'2.5.0-14' in '{{ovs_version.stdout}}'
or
ovs_packaging_issue|succeeded"

View File

@ -0,0 +1,23 @@
---
features:
- Adds common openvswitch service template to be
inherited by other services.
- Adds environment file to be used for deploying
OpenDaylight + OVS DPDK.
- Adds first boot and ovs configuration scripts
deprecations:
- The ``HostCpusList`` parameter is deprecated in
favor of ``OvsDpdkCoreList`` and will be removed
in a future release.
- The ``NeutronDpdkCoreList`` parameter is deprecated in
favor of ``OvsPmdCoreList`` and will be removed
in a future release.
- The ``NeutronDpdkMemoryChannels`` parameter is deprecated in
favor of ``OvsDpdkMemoryChannels`` and will be removed
in a future release.
- The ``NeutronDpdkSocketMemory`` parameter is deprecated in
favor of ``OvsDpdkSocketMemory`` and will be removed
in a future release.
- The ``NeutronDpdkDriverType`` parameter is deprecated in
favor of ``OvsDpdkDriverType`` and will be removed
in a future release.