From f202c5bf4825d3768edd93aa1fe4359daf5ea32b Mon Sep 17 00:00:00 2001 From: davidplunkett Date: Thu, 23 May 2019 21:10:19 +0000 Subject: [PATCH] Enable additional kernel param options Signed-off-by: davidplunkett Change-Id: Ie967b6bf1a895bc801864cec6a5def6d7c4a276e --- dellgen10.yaml | 20 +++++++++++--------- hpgen10.yaml | 20 +++++++++++--------- site_type/ovsdpdk/templates/baremetal/rack.j2 | 16 ++++++++++++---- .../ovsdpdk/templates/profiles/host/compute-r01.j2 | 13 +++++++++---- site_type/ovsdpdk/templates/profiles/host/cp-r01.j2 | 13 +++++++++---- site_type/sriov/templates/baremetal/rack.j2 | 16 ++++++++++++---- .../sriov/templates/profiles/host/compute-r01.j2 | 13 +++++++++---- site_type/sriov/templates/profiles/host/cp-r01.j2 | 13 +++++++++---- 8 files changed, 82 insertions(+), 42 deletions(-) diff --git a/dellgen10.yaml b/dellgen10.yaml index f9bad68..6598ddd 100644 --- a/dellgen10.yaml +++ b/dellgen10.yaml @@ -261,15 +261,17 @@ masters: # pxe: 172.30.2.43 # ksn: 172.29.1.43 # neutron: 10.0.102.43 -#platform: -# vcpu_pin_set: "4-21,26-43,48-65,72-87" -# WARNING: HUGEPAGES APPEARS TO CAUSE ISSUES WITH UCP POSTGRES -# kernel_params: -# hugepagesz: '1G' -# hugepages: 32 -# default_hugepagesz: '1G' -# iommu: 'pt' -# intel_iommu: 'on' +platform: + vcpu_pin_set: "4-21,26-43,48-65,72-87" + kernel_params: + hugepagesz: '1G' + hugepages: 32 + default_hugepagesz: '1G' + transparent_hugepage: 'never' + iommu: 'pt' + intel_iommu: 'on' + amd_iommu: 'on' +# console: 'ttyS1,115200n8' hardware: vendor: DELL generation: '10' diff --git a/hpgen10.yaml b/hpgen10.yaml index b474573..0e057b7 100644 --- a/hpgen10.yaml +++ b/hpgen10.yaml @@ -260,15 +260,17 @@ masters: # pxe: 172.30.1.33 # ksn: 172.29.1.33 # neutron: 10.0.101.33 -#platform: -# vcpu_pin_set: "4-21,26-43,48-65,72-87" -# WARNING: HUGEPAGES APPEARS TO CAUSE ISSUES WITH UCP POSTGRES -# kernel_params: -# hugepagesz: '1G' -# hugepages: 32 -# default_hugepagesz: '1G' -# iommu: 'pt' -# intel_iommu: 'on' +platform: + vcpu_pin_set: "4-21,26-43,48-65,72-87" + kernel_params: + hugepagesz: '1G' + hugepages: 32 + default_hugepagesz: '1G' + transparent_hugepage: 'never' + iommu: 'pt' + intel_iommu: 'on' + amd_iommu: 'on' +# console: 'ttyS1,115200n8' hardware: vendor: HP generation: '10' diff --git a/site_type/ovsdpdk/templates/baremetal/rack.j2 b/site_type/ovsdpdk/templates/baremetal/rack.j2 index ca7e479..d265d78 100644 --- a/site_type/ovsdpdk/templates/baremetal/rack.j2 +++ b/site_type/ovsdpdk/templates/baremetal/rack.j2 @@ -52,8 +52,12 @@ data: platform: kernel_params: {% for key, value in yaml.platform.kernel_params.items() %} - {{key}}: {{value}} -{% endfor %}{% endif %} + {{key}}: '{{value}}' +{% endfor %} +{% if 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} +{% endif %} {% endfor %} {% if 'workers' in yaml %}{% for server in yaml.workers %} --- @@ -94,7 +98,11 @@ data: platform: kernel_params: {% for key, value in yaml.platform.kernel_params.items() %} - {{key}}: {{value}} -{% endfor %}{% endif %} + {{key}}: '{{value}}' +{% endfor %} +{% if 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} +{% endif %} {% endfor %}{% endif %} ... diff --git a/site_type/ovsdpdk/templates/profiles/host/compute-r01.j2 b/site_type/ovsdpdk/templates/profiles/host/compute-r01.j2 index 4e942be..fcaa3e1 100644 --- a/site_type/ovsdpdk/templates/profiles/host/compute-r01.j2 +++ b/site_type/ovsdpdk/templates/profiles/host/compute-r01.j2 @@ -94,15 +94,20 @@ data: image: 'xenial' kernel: 'hwe-16.04' kernel_params: +{% if 'platform' in yaml and 'kernel_params' in yaml.platform %} +{% for key, value in yaml.platform.kernel_params.items() %} + {{key}}: '{{value}}' +{% endfor %} +{% else %} console: 'ttyS1,115200n8' intel_iommu: 'on' iommu: 'pt' amd_iommu: 'on' transparent_hugepage: 'never' - hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - hugepages: 'hardwareprofile:hugepages.dpdk.count' - default_hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - isolcpus: 'hardwareprofile:cpuset.kvm' +{% endif %} +{% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} metadata: owner_data: openstack-nova-compute: enabled diff --git a/site_type/ovsdpdk/templates/profiles/host/cp-r01.j2 b/site_type/ovsdpdk/templates/profiles/host/cp-r01.j2 index e66e85c..b88d621 100644 --- a/site_type/ovsdpdk/templates/profiles/host/cp-r01.j2 +++ b/site_type/ovsdpdk/templates/profiles/host/cp-r01.j2 @@ -93,15 +93,20 @@ data: image: 'xenial' kernel: 'hwe-16.04' kernel_params: +{% if 'platform' in yaml and 'kernel_params' in yaml.platform %} +{% for key, value in yaml.platform.kernel_params.items() %} + {{key}}: '{{value}}' +{% endfor %} +{% else %} console: 'ttyS1,115200n8' intel_iommu: 'on' iommu: 'pt' amd_iommu: 'on' transparent_hugepage: 'never' - hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - hugepages: 'hardwareprofile:hugepages.dpdk.count' - default_hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - isolcpus: 'hardwareprofile:cpuset.kvm' +{% endif %} +{% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} metadata: owner_data: control-plane: enabled diff --git a/site_type/sriov/templates/baremetal/rack.j2 b/site_type/sriov/templates/baremetal/rack.j2 index ca7e479..d265d78 100644 --- a/site_type/sriov/templates/baremetal/rack.j2 +++ b/site_type/sriov/templates/baremetal/rack.j2 @@ -52,8 +52,12 @@ data: platform: kernel_params: {% for key, value in yaml.platform.kernel_params.items() %} - {{key}}: {{value}} -{% endfor %}{% endif %} + {{key}}: '{{value}}' +{% endfor %} +{% if 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} +{% endif %} {% endfor %} {% if 'workers' in yaml %}{% for server in yaml.workers %} --- @@ -94,7 +98,11 @@ data: platform: kernel_params: {% for key, value in yaml.platform.kernel_params.items() %} - {{key}}: {{value}} -{% endfor %}{% endif %} + {{key}}: '{{value}}' +{% endfor %} +{% if 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} +{% endif %} {% endfor %}{% endif %} ... diff --git a/site_type/sriov/templates/profiles/host/compute-r01.j2 b/site_type/sriov/templates/profiles/host/compute-r01.j2 index 4e942be..fcaa3e1 100644 --- a/site_type/sriov/templates/profiles/host/compute-r01.j2 +++ b/site_type/sriov/templates/profiles/host/compute-r01.j2 @@ -94,15 +94,20 @@ data: image: 'xenial' kernel: 'hwe-16.04' kernel_params: +{% if 'platform' in yaml and 'kernel_params' in yaml.platform %} +{% for key, value in yaml.platform.kernel_params.items() %} + {{key}}: '{{value}}' +{% endfor %} +{% else %} console: 'ttyS1,115200n8' intel_iommu: 'on' iommu: 'pt' amd_iommu: 'on' transparent_hugepage: 'never' - hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - hugepages: 'hardwareprofile:hugepages.dpdk.count' - default_hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - isolcpus: 'hardwareprofile:cpuset.kvm' +{% endif %} +{% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} metadata: owner_data: openstack-nova-compute: enabled diff --git a/site_type/sriov/templates/profiles/host/cp-r01.j2 b/site_type/sriov/templates/profiles/host/cp-r01.j2 index e66e85c..b88d621 100644 --- a/site_type/sriov/templates/profiles/host/cp-r01.j2 +++ b/site_type/sriov/templates/profiles/host/cp-r01.j2 @@ -93,15 +93,20 @@ data: image: 'xenial' kernel: 'hwe-16.04' kernel_params: +{% if 'platform' in yaml and 'kernel_params' in yaml.platform %} +{% for key, value in yaml.platform.kernel_params.items() %} + {{key}}: '{{value}}' +{% endfor %} +{% else %} console: 'ttyS1,115200n8' intel_iommu: 'on' iommu: 'pt' amd_iommu: 'on' transparent_hugepage: 'never' - hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - hugepages: 'hardwareprofile:hugepages.dpdk.count' - default_hugepagesz: 'hardwareprofile:hugepages.dpdk.size' - isolcpus: 'hardwareprofile:cpuset.kvm' +{% endif %} +{% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %} + isolcpus: '{{yaml.platform.vcpu_pin_set}}' +{% endif %} metadata: owner_data: control-plane: enabled -- 2.16.6