Add noifupdown for all br-floating
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-noha / openstack_gateway_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 ---
9 {%- import 'net_map.j2' as nm with context %}
10 {%- import 'net_macros.j2' as ma with context %}
11 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
12 {%- set nics = { nm.ctl01.nic_mgmt: True, nm.ctl01.nic_private: True } %}
13 {%- set vlans = { nm.vlan_mgmt: nm.ctl01.nic_mgmt } %}
14 {%- if 'dpdk' not in conf.cluster.domain and not conf.MCP_DPDK_MODE %}
15 {%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
16 {%- do vlans.update({ vlan_private_start: nm.ctl01.nic_private }) %}
17 {%- endif %}
18 parameters:
19   linux:
20     network:
21       bridge: openvswitch
22       interface:
23         pxe_admin_int:
24           enabled: true
25           name: {{ nm.ctl01.nic_admin }}
26           proto: static
27           type: eth
28           address: ${_param:pxe_admin_address}
29           netmask: ${_param:opnfv_net_admin_mask}
30           mtu: ${_param:interface_mtu}
31           noifupdown: true
32
33 {#- prevent duplicates for tagged mgmt on the same physical interface as PXE/admin #}
34 {%- if nm.ctl01.nic_admin in nics %}
35   {%- do nics.pop(nm.ctl01.nic_admin) %}
36 {%- endif %}
37
38 {{ ma.linux_network_interfaces_nic(nics) }}
39
40 {{ ma.linux_network_interfaces_vlan(vlans) }}
41
42         ovs_port_{{ nm.ctl01.nic_public }}:
43           enabled: true
44           name: {{ ma.interface_str(nm.ctl01.nic_public, nm.vlan_public) }}
45           proto: manual
46           ovs_port_type: OVSPort
47           type: ovs_port
48           ovs_bridge: br-floating
49           bridge: br-floating
50         br-floating:
51           enabled: true
52           type: ovs_bridge
53           mtu: ${_param:interface_mtu}
54           proto: static
55           address: ${_param:external_address}
56           netmask: ${_param:opnfv_net_public_mask}
57           use_interfaces:
58             - {{ ma.interface_str(nm.ctl01.nic_public, nm.vlan_public) }}
59           gateway: ${_param:opnfv_net_public_gw}
60           name_servers: {{ nm.dns_public }}
61           noifupdown: true
62         br-mgmt:
63           enabled: true
64           type: bridge
65           proto: static
66           address: ${_param:single_address}
67           netmask: ${_param:opnfv_net_mgmt_mask}
68           mtu: ${_param:interface_mtu}
69           use_interfaces:
70             - {{ ma.interface_str(nm.ctl01.nic_mgmt, nm.vlan_mgmt) }}