1 heat_template_version: pike
4 Open vSwitch Configuration
9 description: Dictionary packing service data
13 description: Mapping of service_name -> network name. Typically set
14 via parameter_defaults in the resource registry. This
15 mapping overrides those in ServiceNetMapDefaults.
22 description: Role name on which the service is applied
26 description: Parameters specific to the role
30 description: Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
35 List of cores to be used for DPDK lcore threads. Note, these threads
36 are used by the OVS control path for validator and handling functions.
39 - allowed_pattern: "[0-9,-]*"
41 OvsDpdkMemoryChannels:
42 description: Number of memory channels per socket to be used for DPDK
45 - allowed_pattern: "[0-9]*"
50 Sets the amount of hugepage memory to assign per NUMA node. It is
51 recommended to use the socket closest to the PCIe slot used for the
52 desired DPDK NIC. The format should be in "<socket 0 mem>, <socket 1
53 mem>, <socket n mem>", where the value is specified in MB. For example:
59 DPDK Driver type. Ensure the Overcloud NIC to be used for DPDK supports
64 A list or range of CPU cores for PMD threads to be pinned to. Note, NIC
65 location to cores on socket, number of hyper-threaded logical cores, and
66 desired number of PMD threads can all play a role in configuring this
67 setting. These cores should be on the same socket where
68 OvsDpdkSocketMemory is assigned. If using hyperthreading then specify
69 both logical cores that would equal the physical core. Also, specifying
70 more than one core will trigger multiple PMD threads to be spawned which
71 may improve dataplane performance.
73 - allowed_pattern: "[0-9,-]*"
76 # DEPRECATED: the following options are deprecated and are currently maintained
77 # for backwards compatibility. They will be removed in the Queens cycle.
79 description: List of cores to be used for host process
82 - allowed_pattern: "[0-9,-]*"
85 description: List of cores to be used for DPDK Poll Mode Driver
88 - allowed_pattern: "[0-9,-]*"
90 NeutronDpdkMemoryChannels:
91 description: Number of memory channels to be used for DPDK
94 - allowed_pattern: "[0-9]*"
96 NeutronDpdkSocketMemory:
98 description: Memory allocated for each socket
100 NeutronDpdkDriverType:
102 description: DPDK Driver type
107 description: Do not use deprecated params, they will be removed.
110 - NeutronDpdkCoreList
111 - NeutronDpdkMemoryChannels
112 - NeutronDpdkSocketMemory
113 - NeutronDpdkDriverType
116 l_cores_empty: {equals: [{get_param: OvsDpdkCoreList}, '']}
117 pmd_cores_empty: {equals: [{get_param: OvsPmdCoreList}, '']}
118 mem_channels_empty: {equals: [{get_param: OvsDpdkMemoryChannels}, '']}
119 socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']}
120 driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']}
124 description: Role data for the Open vSwitch service.
126 service_name: openvswitch
130 - vswitch::dpdk::driver_type: OvsDpdkDriverType
131 vswitch::dpdk::host_core_list: OvsDpdkCoreList
132 vswitch::dpdk::pmd_core_list: OvsPmdCoreList
133 vswitch::dpdk::memory_channels: OvsDpdkMemoryChannels
134 vswitch::dpdk::socket_mem: OvsDpdkSocketMemory
135 - values: {get_param: [RoleParameters]}
137 OvsDpdkCoreList: {if: [l_cores_empty, {get_param: HostCpusList}, {get_param: OvsDpdkCoreList}]}
138 OvsDpdkMemoryChannels: {if: [mem_channels_empty, {get_param: NeutronDpdkMemoryChannels}, {get_param: OvsDpdkMemoryChannels}]}
139 OvsDpdkSocketMemory: {if: [socket_mem_empty, {get_param: NeutronDpdkSocketMemory}, {get_param: OvsDpdkSocketMemory}]}
140 OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]}
141 OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]}
144 - name: Check openvswitch version.
146 register: ovs_version
148 shell: rpm -qa | awk -F- '/^openvswitch-2/{print $2 "-" $3}'
149 - name: Check openvswitch packaging.
151 shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart"
152 register: ovs_packaging_issue
155 - name: "Ensure empty directory: emptying."
158 path: /root/OVS_UPGRADE
159 - name: "Ensure empty directory: creating."
162 path: /root/OVS_UPGRADE
166 - name: Make yum cache.
167 command: yum makecache
168 - name: Download OVS packages.
169 command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch
170 - name: Get rpm list for manual upgrade of OVS.
171 shell: ls -1 /root/OVS_UPGRADE/*.rpm
172 register: ovs_list_of_rpms
173 - name: Manual upgrade of OVS
175 rpm -U --test {{item}} 2>&1 | grep "already installed" || \
176 rpm -U --replacepkgs --notriggerun --nopostun {{item}};
178 chdir: /root/OVS_UPGRADE
180 - "{{ovs_list_of_rpms.stdout_lines}}"
182 when: "'2.5.0-14' in ovs_version.stdout|default('')
184 ovs_packaging_issue|default(false)|succeeded"