aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-27 02:25:22 +0000
committerGerrit Code Review <review@openstack.org>2017-06-27 02:25:22 +0000
commiteaa8092211a7cc805f320ad9aba830a5800d2bce (patch)
tree74fc01bbab40df6b6ef6b573c99fd1559e7262c3
parentd24690765c3fd2703d5aa234767a3389ab1d28b6 (diff)
parent4e19c7a13e4717082f676ec5e72d35e9ea963a33 (diff)
Merge "Enable DPDK on boot using PreNetworkConfig"
-rw-r--r--extraconfig/pre_network/host_config_and_reboot.yaml97
-rw-r--r--puppet/blockstorage-role.yaml1
-rw-r--r--puppet/cephstorage-role.yaml1
-rw-r--r--puppet/compute-role.yaml1
-rw-r--r--puppet/controller-role.yaml1
-rw-r--r--puppet/objectstorage-role.yaml1
-rw-r--r--puppet/role.role.j2.yaml1
-rw-r--r--releasenotes/notes/enable-dpdk-on-boot-f5b098b10152b436.yaml8
8 files changed, 109 insertions, 2 deletions
diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml
index 74e716ad..e4898a6e 100644
--- a/extraconfig/pre_network/host_config_and_reboot.yaml
+++ b/extraconfig/pre_network/host_config_and_reboot.yaml
@@ -11,11 +11,68 @@ parameters:
type: json
description: Role Specific parameters
default: {}
+ ServiceNames:
+ type: comma_delimited_list
+ default: []
+ HostCpusList:
+ default: "0"
+ description: List of cores to be used for host process
+ type: string
+ constraints:
+ - allowed_pattern: "[0-9,-]+"
+ NeutronDpdkCoreList:
+ default: ""
+ description: List of cores to be used for DPDK Poll Mode Driver
+ type: string
+ constraints:
+ - allowed_pattern: "[0-9,-]*"
+ NeutronDpdkMemoryChannels:
+ default: ""
+ description: Number of memory channels to be used for DPDK
+ type: string
+ constraints:
+ - allowed_pattern: "[0-9]*"
+ NeutronDpdkSocketMemory:
+ default: ""
+ description: Memory allocated for each socket
+ type: string
+ NeutronDpdkDriverType:
+ default: "vfio-pci"
+ description: DPDK Driver type
+ type: string
conditions:
is_host_config_required: {not: {equals: [{get_param: [RoleParameters, KernelArgs]}, ""]}}
+ # YAQL is enabled in conditions with https://review.openstack.org/#/c/467506/
+ is_dpdk_config_required:
+ yaql:
+ expression: $.data.service_names.contains('neutron_ovs_dpdk_agent')
+ data:
+ service_names: {get_param: ServiceNames}
+ is_reboot_config_required:
+ or:
+ - is_host_config_required
+ - is_dpdk_config_required
resources:
+ RoleParametersValue:
+ type: OS::Heat::Value
+ properties:
+ type: json
+ value:
+ map_replace:
+ - map_replace:
+ - HostCpusList: HostCpusList
+ NeutronDpdkCoreList: NeutronDpdkCoreList
+ NeutronDpdkMemoryChannels: NeutronDpdkMemoryChannels
+ NeutronDpdkSocketMemory: NeutronDpdkSocketMemory
+ - values: {get_param: [RoleParameters]}
+ - values:
+ HostCpusList: {get_param: HostCpusList}
+ NeutronDpdkCoreList: {get_param: NeutronDpdkCoreList}
+ NeutronDpdkMemoryChannels: {get_param: NeutronDpdkMemoryChannels}
+ NeutronDpdkSocketMemory: {get_param: NeutronDpdkSocketMemory}
+
HostParametersConfig:
type: OS::Heat::SoftwareConfig
condition: is_host_config_required
@@ -43,9 +100,45 @@ resources:
_TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
_TUNED_CORES_: {get_param: [RoleParameters, HostIsolatedCoreList]}
+ EnableDpdkConfig:
+ type: OS::Heat::SoftwareConfig
+ condition: is_dpdk_config_required
+ properties:
+ group: script
+ config:
+ str_replace:
+ template: |
+ #!/bin/bash
+ set -x
+ # DO NOT use --detailed-exitcodes
+ puppet apply --logdest console \
+ --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
+ -e '
+ class {"vswitch::dpdk":
+ host_core_list => "$HOST_CORES",
+ pmd_core_list => "$PMD_CORES",
+ memory_channels => "$MEMORY_CHANNELS",
+ socket_mem => "$SOCKET_MEMORY",
+ }
+ '
+ params:
+ $HOST_CORES: {get_attr: [RoleParametersValue, value, HostCpusList]}
+ $PMD_CORES: {get_attr: [RoleParametersValue, value, NeutronDpdkCoreList]}
+ $MEMORY_CHANNELS: {get_attr: [RoleParametersValue, value, NeutronDpdkMemoryChannels]}
+ $SOCKET_MEMORY: {get_attr: [RoleParametersValue, value, NeutronDpdkSocketMemory]}
+
+ EnableDpdkDeployment:
+ type: OS::Heat::SoftwareDeployment
+ condition: is_dpdk_config_required
+ properties:
+ name: EnableDpdkDeployment
+ server: {get_param: server}
+ config: {get_resource: EnableDpdkConfig}
+ actions: ['CREATE'] # Only do this on CREATE
+
RebootConfig:
type: OS::Heat::SoftwareConfig
- condition: is_host_config_required
+ condition: is_reboot_config_required
properties:
group: script
config: |
@@ -58,7 +151,7 @@ resources:
RebootDeployment:
type: OS::Heat::SoftwareDeployment
depends_on: HostParametersDeployment
- condition: is_host_config_required
+ condition: is_reboot_config_required
properties:
name: RebootDeployment
server: {get_param: server}
diff --git a/puppet/blockstorage-role.yaml b/puppet/blockstorage-role.yaml
index 40b2ca57..612a4a01 100644
--- a/puppet/blockstorage-role.yaml
+++ b/puppet/blockstorage-role.yaml
@@ -407,6 +407,7 @@ resources:
properties:
server: {get_resource: BlockStorage}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
diff --git a/puppet/cephstorage-role.yaml b/puppet/cephstorage-role.yaml
index 78d66fa8..e7afcb40 100644
--- a/puppet/cephstorage-role.yaml
+++ b/puppet/cephstorage-role.yaml
@@ -413,6 +413,7 @@ resources:
properties:
server: {get_resource: CephStorage}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
diff --git a/puppet/compute-role.yaml b/puppet/compute-role.yaml
index 12c4445a..5a662e86 100644
--- a/puppet/compute-role.yaml
+++ b/puppet/compute-role.yaml
@@ -416,6 +416,7 @@ resources:
properties:
server: {get_resource: NovaCompute}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkConfig:
type: OS::TripleO::Compute::Net::SoftwareConfig
diff --git a/puppet/controller-role.yaml b/puppet/controller-role.yaml
index 1036ffbf..09e5b2b9 100644
--- a/puppet/controller-role.yaml
+++ b/puppet/controller-role.yaml
@@ -439,6 +439,7 @@ resources:
properties:
server: {get_resource: Controller}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkConfig:
type: OS::TripleO::Controller::Net::SoftwareConfig
diff --git a/puppet/objectstorage-role.yaml b/puppet/objectstorage-role.yaml
index 6a5f2d20..4a1670f8 100644
--- a/puppet/objectstorage-role.yaml
+++ b/puppet/objectstorage-role.yaml
@@ -408,6 +408,7 @@ resources:
properties:
server: {get_resource: SwiftStorage}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml
index 8b6be860..b45736c1 100644
--- a/puppet/role.role.j2.yaml
+++ b/puppet/role.role.j2.yaml
@@ -433,6 +433,7 @@ resources:
properties:
server: {get_resource: {{role}}}
RoleParameters: {get_param: RoleParameters}
+ ServiceNames: {get_param: ServiceNames}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
diff --git a/releasenotes/notes/enable-dpdk-on-boot-f5b098b10152b436.yaml b/releasenotes/notes/enable-dpdk-on-boot-f5b098b10152b436.yaml
new file mode 100644
index 00000000..4cb9b801
--- /dev/null
+++ b/releasenotes/notes/enable-dpdk-on-boot-f5b098b10152b436.yaml
@@ -0,0 +1,8 @@
+---
+features:
+ - DPDK is enabled in OvS before the NetworkDeployment to ensure DPDK
+ is ready to handle new port additions.
+upgrade:
+ - A new parameter ServiceNames is added to the PreNeworkConfig resource.
+ All templates associated with PreNeworkConfig should add this new
+ parameter during the upgrade.