Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define networking for Multi-node environments
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>
- Loading branch information
Jean-Philippe Evrard
authored and
Jesse Pretorius (odyssey4me)
committed
Sep 18, 2016
1 parent
5e65a9e
commit 51f4dec
Showing
3 changed files
with
135 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/roles/bootstrap-host/templates/osa_interfaces_multinode.cfg.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% 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 %} |