[ovs/dpdk] Parameterize node-specific compute args
[fuel.git] / mcp / reclass / classes / cluster / all-mcp-arch-common / infra / config_dpdk_pdf.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 ---
10 parameters:
11   reclass:
12     storage:
13       node:
14         # NOTE: Until SDF is in place, assume all computes are identical
15         openstack_compute_node01: &openstack_compute_node01
16           params:
17 {#- No partial defaults, all or nothing. Defaults tuned for lf-pod2. #}
18 {%- if conf.idf.fuel.reclass is defined %}
19 {%- if conf.idf.fuel.reclass.node[nm.cmp001.idx].compute_params.dpdk is defined %}
20 {#- Can't dump json here due to dpdk0_* below, explicitly create yaml #}
21 {%- set _dpdk = conf.idf.fuel.reclass.node[nm.cmp001.idx].compute_params.dpdk %}
22 {%- for _i in _dpdk %}
23             {{ _i }}: '"{{ _dpdk[_i] }}"'
24 {%- endfor %}
25 {%- endif %}
26 {%- else %}
27             nova_cpu_pinning: '"5-7,13-15"'
28             compute_hugepages_size: 2M
29             compute_hugepages_count: 8192
30             compute_hugepages_mount: /mnt/hugepages_2M
31             compute_kernel_isolcpu: 2,3,5,6,7,10,11,13,14,15
32             compute_dpdk_driver: uio
33             compute_ovs_pmd_cpu_mask: '"0xc04"'
34             compute_ovs_dpdk_socket_mem: '"2048,2048"'
35             compute_ovs_dpdk_lcore_mask: '"0x8"'
36             compute_ovs_memory_channels: '"2"'
37             dpdk0_driver: igb_uio
38             dpdk0_n_rxq: 2
39 {%- endif %}
40             dpdk0_name: {{ nm.cmp001.nic_private }}
41             dpdk0_pci: '"{{ nm.cmp001.bus_private }}"'
42         openstack_compute_node02:
43           <<: *openstack_compute_node01