From 6e46828a3944855cc54a3c47a57e2d304a1d7d90 Mon Sep 17 00:00:00 2001 From: stephane Date: Tue, 23 Jun 2015 16:05:34 -0700 Subject: [PATCH] Make MTU configurable Allow users to tune the MTU value in the configuration drive network_info.json. Change-Id: Id686eb940545463ceb796704dfdd6bd2726ea753 Closes-Bug: 1463195 --- playbooks/inventory/group_vars/all | 1 + .../bifrost-configdrives-dynamic/templates/network_info.json.j2 | 2 +- .../roles/bifrost-configdrives/templates/network_info.json.j2 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/playbooks/inventory/group_vars/all b/playbooks/inventory/group_vars/all index 42d2b7011..e39a0c406 100644 --- a/playbooks/inventory/group_vars/all +++ b/playbooks/inventory/group_vars/all @@ -33,6 +33,7 @@ node_default_network_interface: eth0 ipv4_subnet_mask: 255.255.255.0 ipv4_gateway: 192.168.1.1 ipv4_nameserver: 8.8.8.8 +network_mtu: 1500 dhcp_pool_start: 192.168.1.200 dhcp_pool_end: 192.168.1.250 # ipmi_bridging: Default undefined. Valid values: "no", "single", and "dual" diff --git a/playbooks/roles/bifrost-configdrives-dynamic/templates/network_info.json.j2 b/playbooks/roles/bifrost-configdrives-dynamic/templates/network_info.json.j2 index a6e9f0b1f..6922ff47f 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/templates/network_info.json.j2 +++ b/playbooks/roles/bifrost-configdrives-dynamic/templates/network_info.json.j2 @@ -10,7 +10,7 @@ with the information that we have available to us in nics. {% for nic in nics %} {%- if loop.first %} "ethernet_mac_address": "{{ nic.mac }}",{% endif %} {% endfor %} - "mtu":1500 + "mtu":{{network_mtu}} } ], "networks": [ diff --git a/playbooks/roles/bifrost-configdrives/templates/network_info.json.j2 b/playbooks/roles/bifrost-configdrives/templates/network_info.json.j2 index be118a64d..e0d4e759c 100644 --- a/playbooks/roles/bifrost-configdrives/templates/network_info.json.j2 +++ b/playbooks/roles/bifrost-configdrives/templates/network_info.json.j2 @@ -4,7 +4,7 @@ "id": "{{node_default_network_interface}}", "type": "phy", "ethernet_mac_address": "{{item.split(',')[0]}}", - "mtu":1500 + "mtu":{{network_mtu}} } ], "networks": [