51f4dec329
This commit makes makes possible to have multi-node environments, by having a different way to configure networking. By default, if multi-node is enabled, vxlan encapsulation of the usual traffic will be enabled. If encapsulation is disabled, but multi-node is enabled, the encapsulation sections will be skipped. The deployer should therefore define the variables to plug the bridges into the appropriate interfaces with the variables ``bootstrap_host_bridge_(mgmt|vxlan|storage)_ports`` Change-Id: I6a88b2afa76130575e67601628808b7a573aa834 Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
28 lines
1.1 KiB
Django/Jinja
28 lines
1.1 KiB
Django/Jinja
{% if bootstrap_host_encapsulation_enabled | bool %}
|
|
{% for nic_name, nic_details in bootstrap_host_encapsulation_interfaces.iteritems() %}
|
|
# {{ nic_details.friendly_name }}
|
|
auto {{ nic_name }}
|
|
iface {{ nic_name }} inet manual
|
|
pre-up ip link add {{ nic_name }} type vxlan id {{ nic_details.id }} group 239.0.0.{{ nic_details.id }} dev {{ nic_details.underlay_device }} || true
|
|
up ip link set $IFACE up
|
|
down ip link set $IFACE down
|
|
post-down ip link del {{ nic_name }} || true
|
|
|
|
{% endfor %}
|
|
{% endif %}
|
|
{%- for nic_name, nic_details in bootstrap_host_bridges_interfaces.iteritems() -%}
|
|
auto {{ nic_name }}
|
|
iface {{ nic_name }} inet {{ nic_details.mode | default('static') }}
|
|
bridge_stp off
|
|
bridge_waitport 0
|
|
bridge_fd 0
|
|
bridge_ports {{ nic_details.ports }}
|
|
offload-sg {{ nic_details.offload_sg | default('off') }}
|
|
{% if nic_details.mode | default('static') == 'static' -%}
|
|
address {{ nic_details.ip_address_range }}.{{ node_id }}
|
|
netmask {{ nic_details.ip_netmask }}
|
|
{% endif %}
|
|
{%- if nic_details.state_change_scripts is defined %}{{ nic_details.state_change_scripts }}
|
|
{% endif %}
|
|
|
|
{% endfor %} |