1 heat_template_version: pike
4 Open vSwitch Configuration
9 description: Mapping of service_name -> network name. Typically set
10 via parameter_defaults in the resource registry. This
11 mapping overrides those in ServiceNetMapDefaults.
18 description: Role name on which the service is applied
22 description: Parameters specific to the role
26 description: Mapping of service endpoint -> protocol. Typically set
27 via parameter_defaults in the resource registry.
31 List of cores to be used for DPDK lcore threads. Note, these threads
32 are used by the OVS control path for validator and handling functions.
35 - allowed_pattern: "[0-9,-]*"
37 OvsDpdkMemoryChannels:
38 description: Number of memory channels per socket to be used for DPDK
41 - allowed_pattern: "[0-9]*"
46 Sets the amount of hugepage memory to assign per NUMA node. It is
47 recommended to use the socket closest to the PCIe slot used for the
48 desired DPDK NIC. The format should be in "<socket 0 mem>, <socket 1
49 mem>, <socket n mem>", where the value is specified in MB. For example:
55 DPDK Driver type. Ensure the Overcloud NIC to be used for DPDK supports
60 A list or range of CPU cores for PMD threads to be pinned to. Note, NIC
61 location to cores on socket, number of hyper-threaded logical cores, and
62 desired number of PMD threads can all play a role in configuring this
63 setting. These cores should be on the same socket where
64 OvsDpdkSocketMemory is assigned. If using hyperthreading then specify
65 both logical cores that would equal the physical core. Also, specifying
66 more than one core will trigger multiple PMD threads to be spawned which
67 may improve dataplane performance.
69 - allowed_pattern: "[0-9,-]*"
72 # DEPRECATED: the following options are deprecated and are currently maintained
73 # for backwards compatibility. They will be removed in the Queens cycle.
75 description: List of cores to be used for host process
78 - allowed_pattern: "[0-9,-]*"
81 description: List of cores to be used for DPDK Poll Mode Driver
84 - allowed_pattern: "[0-9,-]*"
86 NeutronDpdkMemoryChannels:
87 description: Number of memory channels to be used for DPDK
90 - allowed_pattern: "[0-9]*"
92 NeutronDpdkSocketMemory:
94 description: Memory allocated for each socket
96 NeutronDpdkDriverType:
98 description: DPDK Driver type
103 description: Do not use deprecated params, they will be removed.
106 - NeutronDpdkCoreList
107 - NeutronDpdkMemoryChannels
108 - NeutronDpdkSocketMemory
109 - NeutronDpdkDriverType
112 l_cores_empty: {equals: [{get_param: OvsDpdkCoreList}, '']}
113 pmd_cores_empty: {equals: [{get_param: OvsPmdCoreList}, '']}
114 mem_channels_empty: {equals: [{get_param: OvsDpdkMemoryChannels}, '']}
115 socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']}
116 driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']}
120 description: Role data for the Open vSwitch service.
122 service_name: openvswitch
126 - vswitch::dpdk::driver_type: OvsDpdkDriverType
127 vswitch::dpdk::host_core_list: OvsDpdkCoreList
128 vswitch::dpdk::pmd_core_list: OvsPmdCoreList
129 vswitch::dpdk::memory_channels: OvsDpdkMemoryChannels
130 vswitch::dpdk::socket_mem: OvsDpdkSocketMemory
131 - values: {get_param: [RoleParameters]}
133 OvsDpdkCoreList: {if: [l_cores_empty, {get_param: HostCpusList}, {get_param: OvsDpdkCoreList}]}
134 OvsDpdkMemoryChannels: {if: [mem_channels_empty, {get_param: NeutronDpdkMemoryChannels}, {get_param: OvsDpdkMemoryChannels}]}
135 OvsDpdkSocketMemory: {if: [socket_mem_empty, {get_param: NeutronDpdkSocketMemory}, {get_param: OvsDpdkSocketMemory}]}
136 OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]}
137 OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]}
140 - name: Check openvswitch version.
142 register: ovs_version
144 shell: rpm -qa | awk -F- '/^openvswitch-2/{print $2 "-" $3}'
145 - name: Check openvswitch packaging.
147 shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
148 register: ovs_packaging_issue
151 - name: "Ensure empty directory: emptying."
154 path: /root/OVS_UPGRADE
155 - name: "Ensure empty directory: creating."
158 path: /root/OVS_UPGRADE
162 - name: Download OVS packages.
163 command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch
164 - name: Get rpm list for manual upgrade of OVS.
165 shell: ls -1 /root/OVS_UPGRADE/*.rpm
166 register: ovs_list_of_rpms
167 - name: Manual upgrade of OVS
169 rpm -U --test {{item}} 2>&1 | grep "already installed" || \
170 rpm -U --replacepkgs --notriggerun --nopostun {{item}};
172 chdir: /root/OVS_UPGRADE
174 - "{{ovs_list_of_rpms.stdout_lines}}"
176 when: "'2.5.0-14' in '{{ovs_version.stdout}}'
178 ovs_packaging_issue|succeeded"