15.4. compute-ovs-dpdk.j2
--- {% set mtu_list = [ctlplane_mtu] %} {% for network in role_networks if network not in 'Tenant,External' %} {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: interface name: nic1 use_dhcp: false addresses: - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} routes: - ip_netmask: 169.254.169.254/32 next_hop: {{ ctlplane_ip }} - default: true next_hop: {{ ctlplane_gateway_ip }} - type: linux_bond name: bond_api mtu: {{ min_viable_mtu }} bonding_options: mode=active-backup use_dhcp: false dns_servers: {{ ctlplane_dns_nameservers }} members: - type: interface name: nic2 primary: true - type: interface name: nic3 {% for network in role_networks if network not in 'Tenant,External' %} - type: vlan mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} device: bond_api vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} addresses: - ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} {% endfor %} - type: ovs_user_bridge name: br-link0 use_dhcp: false ovs_extra: "set port br-link0 tag={{ lookup('vars', networks_lower['Tenant'] ~ '_vlan_id') }}" addresses: - ip_netmask: {{ lookup('vars', networks_lower['Tenant'] ~ '_ip') }}/{{ lookup('vars', networks_lower['Tenant'] ~ '_cidr')}} members: - type: ovs_dpdk_bond name: dpdkbond0 rx_queue: 1 ovs_extra: "set port dpdkbond0 bond_mode=balance-slb" members: - type: ovs_dpdk_port name: dpdk0 members: - type: interface name: nic4 - type: ovs_dpdk_port name: dpdk1 members: - type: interface name: nic5