Add platform kernel_params support, fix vxlan 86/786/1
authordavidplunkett <dp7642@att.com>
Thu, 23 May 2019 03:29:51 +0000 (03:29 +0000)
committerdavidplunkett <dp7642@att.com>
Thu, 23 May 2019 03:32:46 +0000 (03:32 +0000)
Add support for platform kernel params in input file
to be mapped to rack.j2 and SRV_KERNEL_PARAMS

Signed-off-by: davidplunkett <dp7642@att.com>
Change-Id: Iac6ca2c905845541aba3a1255f69fb285cac7ce6
Signed-off-by: davidplunkett <dp7642@att.com>
dellgen10.yaml
hpgen10.yaml
site_type/ovsdpdk/templates/baremetal/rack.j2
site_type/sriov/templates/baremetal/rack.j2
tools/j2/serverrc.j2

index 9cb3f47..171020c 100644 (file)
@@ -215,9 +215,6 @@ genesis:
   ksn: 172.29.1.40
   neutron: 10.0.102.40
   root_password: akraino,d
-#  bios_template: dell_r740_g14_uefi_base.xml.template
-#  boot_template: dell_r740_g14_uefi_httpboot.xml.template
-#  http_boot_device: NIC.Slot.2-1-1
 masters:
   - name : aknode41
     oob: 192.168.41.41
@@ -245,13 +242,13 @@ masters:
 #    pxe: 172.30.2.43
 #    ksn: 172.29.1.43
 #    neutron: 10.0.102.43
-#  - name : aknode44
-#    oob: 192.168.41.44
-#    host: 192.168.2.44
-#    storage: 172.31.2.44
-#    pxe: 172.30.2.44
-#    ksn: 172.29.1.44
-#    neutron: 10.0.102.44
+platform:
+  kernel_params:
+    hugepagesz: '1G'
+    hugepages: 32
+    default_hugepagesz: '1G'
+    iommu: 'pt'
+    intel_iommu: 'on'
 hardware:
   vendor: DELL
   generation: '10'
index 0b336b8..39c6d5e 100644 (file)
@@ -214,9 +214,6 @@ genesis:
   neutron: 10.0.101.30
   root_password: akraino,d
   mac_address: 3c:fd:fe:aa:90:b0
-#  bios_template: hpe_dl380_g10_uefi_base.json.template
-#  boot_template: hpe_dl380_g10_uefi_httpboot.json.template
-#  http_boot_device: NIC.Slot.3-1-1
 masters:
   - name : aknode31
     oob: 192.168.41.131
@@ -244,15 +241,13 @@ masters:
 #    pxe: 172.30.1.33
 #    ksn: 172.29.1.33
 #    neutron: 10.0.101.33
-#    oob_user: Administrator
-#    oob_password: Admin123
-#  - name : aknode34
-#    oob: 192.168.41.134
-#    host: 192.168.2.34
-#    storage: 172.31.1.34
-#    pxe: 172.30.1.34
-#    ksn: 172.29.1.34
-#    neutron: 10.0.101.34
+platform:
+  kernel_params:
+    hugepagesz: '1G'
+    hugepages: 32
+    default_hugepagesz: '1G'
+    iommu: 'pt'
+    intel_iommu: 'on'
 hardware:
   vendor: HP
   generation: '10'
index 464a826..25ddcde 100644 (file)
@@ -48,6 +48,12 @@ data:
     rack: RACK01
     tags:
       - 'masters'
+{% if 'platform' in yaml %}
+  platform:
+    kernel_params:
+{% for key, value in yaml.platform.kernel_params.items() %}
+      {{key}}: {{value}}
+{% endfor %}{% endif %}
 {% endfor %}
 {% if 'workers' in yaml %}{% for server in yaml.workers %}
 ---
@@ -84,5 +90,12 @@ data:
     rack: RACK01
     tags:
       - 'workers'
+{% if 'platform' in yaml %}
+  platform:
+    kernel_params:
+{% for key, value in yaml.platform.kernel_params.items() %}
+      {{key}}: {{value}}
+{% endfor %}{% endif %}
 {% endfor %}{% endif %}
 ...
+
index 464a826..25ddcde 100644 (file)
@@ -48,6 +48,12 @@ data:
     rack: RACK01
     tags:
       - 'masters'
+{% if 'platform' in yaml %}
+  platform:
+    kernel_params:
+{% for key, value in yaml.platform.kernel_params.items() %}
+      {{key}}: {{value}}
+{% endfor %}{% endif %}
 {% endfor %}
 {% if 'workers' in yaml %}{% for server in yaml.workers %}
 ---
@@ -84,5 +90,12 @@ data:
     rack: RACK01
     tags:
       - 'workers'
+{% if 'platform' in yaml %}
+  platform:
+    kernel_params:
+{% for key, value in yaml.platform.kernel_params.items() %}
+      {{key}}: {{value}}
+{% endfor %}{% endif %}
 {% endfor %}{% endif %}
 ...
+
index d20c2ab..0356fd3 100644 (file)
@@ -54,6 +54,7 @@ SRV_HTTP_BOOT_DEV={% if 'http_boot_device' in yaml.genesis %}{{yaml.genesis.http
 # tempalte to run to configure OS after first boot
 # current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
 SRV_FIRSTBOOT_TEMPLATE=firstboot-genesis.sh.template
+SRV_KERNEL_PARAMS="{% if 'platform' in yaml %}{% for key, value in yaml.platform.kernel_params.items() %}{{key}}={{value}}{{ ' ' if not loop.last else '' }}{% endfor %}{% endif %}"
 
 # VLAN to use during build and for final network configuration
 SRV_VLAN={{yaml.networks.host.vlan}}
@@ -61,7 +62,7 @@ SRV_STORAGE_VLAN={{yaml.networks.storage.vlan}}
 SRV_CALICO_VLAN={{yaml.networks.ksn.vlan}}
 SRV_NEUTRON_VLAN={{yaml.networks.neutron.vlan}}
 SRV_PXE_INF={{yaml.networks.pxe.interface}}
-SRV_VXLAN_INF={{yaml.networks.vxlan.interface}}
+SRV_VXLAN_INF={% if 'vxlan' in yaml.networks %}{{yaml.networks.vxlan.interface}}{% endif %}
 
 # basic network information for dhcp config and final server network settings
 SRV_MTU=9000
@@ -70,7 +71,8 @@ SRV_STORAGE_IP={{yaml.genesis.storage}}
 SRV_CALICO_IP={{yaml.genesis.ksn}}
 SRV_NEUTRON_IP={{yaml.genesis.neutron}}
 SRV_PXE_IP={{yaml.genesis.pxe}}
-SRV_VXLAN_IP={{yaml.genesis.vxlan}}
+SRV_VXLAN_IP={% if 'vxlan' in yaml.networks %}{{yaml.genesis.vxlan}}{% endif %}
+
 SRV_SUBNET={{yaml.networks.host.cidr | cidr_subnet}}
 SRV_NETMASK={{yaml.networks.host.cidr | cidr_netmask}}
 SRV_GATEWAY={{yaml.networks.host.routes.gateway}}
@@ -91,4 +93,3 @@ SRV_BOND={{yaml.networks.primary}}
 {% for slave in yaml.networks.slaves %}
 SRV_SLAVE{{loop.index}}={{slave.name}}
 {% endfor %}
-