From cf333d3a07c74353e7f173b1caaefff69a2a59cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Mon, 7 Jan 2019 22:09:27 +0100 Subject: [PATCH] Add default to network.mtu in j2 in nic configs Previously all networks was rendered for all roles, and thus the default set in network/network.j2#L83 would propgate to the nic config for any role. Since we now only include properties for network's in role.networks when passing parameters puppet/role.role.j2.yaml this default may not propagate to the nic config and can cause problems if merge-new-params-nic-config-script.py was used to add new parameters with a role missmatch. (i.e Updating the Compute roles NIC config file while specifying the Controller role in merge-new-params tool would add the parameter with no default which causes Property {{network.name}}Mtu not assigned error when deploying. Change-Id: I3031977a0daabb093cb8f61bcfc22b68e8e35bed --- net-config-bond.j2.yaml | 2 +- net-config-bridge.j2.yaml | 2 +- net-config-linux-bridge.j2.yaml | 2 +- net-config-noop.j2.yaml | 2 +- net-config-standalone.j2.yaml | 2 +- net-config-static-bridge-with-external-dhcp.j2.yaml | 2 +- net-config-static-bridge.j2.yaml | 2 +- net-config-static.j2.yaml | 2 +- net-config-undercloud.j2.yaml | 2 +- network/config/2-linux-bonds-vlans/role.role.j2.yaml | 2 +- network/config/bond-with-vlans/controller-no-external.j2.yaml | 2 +- network/config/bond-with-vlans/controller-v6.j2.yaml | 2 +- network/config/bond-with-vlans/role.role.j2.yaml | 2 +- network/config/multiple-nics/compute-dvr.j2.yaml | 2 +- network/config/multiple-nics/controller-v6.j2.yaml | 2 +- network/config/multiple-nics/role.role.j2.yaml | 2 +- .../config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml | 2 +- network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml | 2 +- network/config/single-nic-vlans/controller-no-external.j2.yaml | 2 +- network/config/single-nic-vlans/controller-v6.j2.yaml | 2 +- network/config/single-nic-vlans/role.role.j2.yaml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/net-config-bond.j2.yaml b/net-config-bond.j2.yaml index 4f19f34955..fb23f08cee 100644 --- a/net-config-bond.j2.yaml +++ b/net-config-bond.j2.yaml @@ -59,7 +59,7 @@ parameters: description: IP address/subnet on the {{network.name_lower}} network type: string {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-bridge.j2.yaml b/net-config-bridge.j2.yaml index 0fba3a530f..69793d34f8 100644 --- a/net-config-bridge.j2.yaml +++ b/net-config-bridge.j2.yaml @@ -57,7 +57,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-linux-bridge.j2.yaml b/net-config-linux-bridge.j2.yaml index 8765f344e5..211561f235 100644 --- a/net-config-linux-bridge.j2.yaml +++ b/net-config-linux-bridge.j2.yaml @@ -20,7 +20,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-noop.j2.yaml b/net-config-noop.j2.yaml index dbc1a94a5f..b8f4375c0a 100644 --- a/net-config-noop.j2.yaml +++ b/net-config-noop.j2.yaml @@ -60,7 +60,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-standalone.j2.yaml b/net-config-standalone.j2.yaml index 1479bd9224..453d4dc63b 100644 --- a/net-config-standalone.j2.yaml +++ b/net-config-standalone.j2.yaml @@ -21,7 +21,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-static-bridge-with-external-dhcp.j2.yaml b/net-config-static-bridge-with-external-dhcp.j2.yaml index 606666fca4..d92316f06b 100644 --- a/net-config-static-bridge-with-external-dhcp.j2.yaml +++ b/net-config-static-bridge-with-external-dhcp.j2.yaml @@ -21,7 +21,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-static-bridge.j2.yaml b/net-config-static-bridge.j2.yaml index 9f80a1566f..4e8e7b8693 100644 --- a/net-config-static-bridge.j2.yaml +++ b/net-config-static-bridge.j2.yaml @@ -21,7 +21,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-static.j2.yaml b/net-config-static.j2.yaml index b519bede28..deee6bd624 100644 --- a/net-config-static.j2.yaml +++ b/net-config-static.j2.yaml @@ -20,7 +20,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/net-config-undercloud.j2.yaml b/net-config-undercloud.j2.yaml index 71e68eb0ea..12dae91aeb 100644 --- a/net-config-undercloud.j2.yaml +++ b/net-config-undercloud.j2.yaml @@ -21,7 +21,7 @@ parameters: from the subnet host_routes attribute. type: json {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/2-linux-bonds-vlans/role.role.j2.yaml b/network/config/2-linux-bonds-vlans/role.role.j2.yaml index 696a0dcef6..56aa91dbee 100644 --- a/network/config/2-linux-bonds-vlans/role.role.j2.yaml +++ b/network/config/2-linux-bonds-vlans/role.role.j2.yaml @@ -54,7 +54,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/bond-with-vlans/controller-no-external.j2.yaml b/network/config/bond-with-vlans/controller-no-external.j2.yaml index 993dbd1e56..a3add89b41 100644 --- a/network/config/bond-with-vlans/controller-no-external.j2.yaml +++ b/network/config/bond-with-vlans/controller-no-external.j2.yaml @@ -45,7 +45,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/bond-with-vlans/controller-v6.j2.yaml b/network/config/bond-with-vlans/controller-v6.j2.yaml index 6963886ce7..0adbf78745 100644 --- a/network/config/bond-with-vlans/controller-v6.j2.yaml +++ b/network/config/bond-with-vlans/controller-v6.j2.yaml @@ -43,7 +43,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/bond-with-vlans/role.role.j2.yaml b/network/config/bond-with-vlans/role.role.j2.yaml index 2bd747ca9f..6bfbe3d9ff 100644 --- a/network/config/bond-with-vlans/role.role.j2.yaml +++ b/network/config/bond-with-vlans/role.role.j2.yaml @@ -52,7 +52,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/multiple-nics/compute-dvr.j2.yaml b/network/config/multiple-nics/compute-dvr.j2.yaml index 4c7341b87f..915f44c234 100644 --- a/network/config/multiple-nics/compute-dvr.j2.yaml +++ b/network/config/multiple-nics/compute-dvr.j2.yaml @@ -43,7 +43,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/multiple-nics/controller-v6.j2.yaml b/network/config/multiple-nics/controller-v6.j2.yaml index 45e62b82fb..c41ae4be37 100644 --- a/network/config/multiple-nics/controller-v6.j2.yaml +++ b/network/config/multiple-nics/controller-v6.j2.yaml @@ -42,7 +42,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/multiple-nics/role.role.j2.yaml b/network/config/multiple-nics/role.role.j2.yaml index e58207ab83..49580ce468 100644 --- a/network/config/multiple-nics/role.role.j2.yaml +++ b/network/config/multiple-nics/role.role.j2.yaml @@ -52,7 +52,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml index 0c1f120c86..082ba12f54 100644 --- a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml @@ -42,7 +42,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml index 2c73894f30..9bbc582d04 100644 --- a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml @@ -52,7 +52,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/single-nic-vlans/controller-no-external.j2.yaml b/network/config/single-nic-vlans/controller-no-external.j2.yaml index f0d5acd453..31af97cc94 100644 --- a/network/config/single-nic-vlans/controller-no-external.j2.yaml +++ b/network/config/single-nic-vlans/controller-no-external.j2.yaml @@ -45,7 +45,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/single-nic-vlans/controller-v6.j2.yaml b/network/config/single-nic-vlans/controller-v6.j2.yaml index c852705315..1ce361ecd7 100644 --- a/network/config/single-nic-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-vlans/controller-v6.j2.yaml @@ -42,7 +42,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network. diff --git a/network/config/single-nic-vlans/role.role.j2.yaml b/network/config/single-nic-vlans/role.role.j2.yaml index 54eb7f1df2..5701c0e4b2 100644 --- a/network/config/single-nic-vlans/role.role.j2.yaml +++ b/network/config/single-nic-vlans/role.role.j2.yaml @@ -52,7 +52,7 @@ parameters: description: Vlan ID for the {{network.name_lower}} network traffic. type: number {{network.name}}Mtu: - default: {{network.mtu}} + default: {{network.mtu|default('1500')}} description: The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data path of the segments in the {{network.name}} network.