diff options
Diffstat (limited to 'extraconfig')
6 files changed, 170 insertions, 98 deletions
diff --git a/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml b/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml index fb0d1699..96632bc2 100644 --- a/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml +++ b/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml @@ -59,19 +59,6 @@ parameters: description: | When enabled, the system will perform a yum update after performing the RHEL Registration process. - deployment_actions: - default: ['CREATE', 'UPDATE'] - type: comma_delimited_list - description: > - List of stack actions that will trigger any deployments in this - templates. The actions will be an empty list of the server is in the - toplevel DeploymentServerBlacklist parameter's value. - -conditions: - deployment_actions_empty: - equals: - - {get_param: deployment_actions} - - [] resources: @@ -149,11 +136,7 @@ resources: name: RHELUnregistrationDeployment server: {get_param: server} config: {get_resource: RHELUnregistration} - actions: - if: - - deployment_actions_empty - - [] - - ['DELETE'] # Only do this on DELETE + actions: ['DELETE'] # Only do this on DELETE input_values: REG_METHOD: {get_param: rhel_reg_method} @@ -186,11 +169,7 @@ resources: name: UpdateDeploymentAfterRHELRegistration config: {get_resource: YumUpdateConfigurationAfterRHELRegistration} server: {get_param: server} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE outputs: deploy_stdout: diff --git a/extraconfig/pre_network/ansible_host_config.yaml b/extraconfig/pre_network/ansible_host_config.yaml index f4f1a14a..2d862613 100644 --- a/extraconfig/pre_network/ansible_host_config.yaml +++ b/extraconfig/pre_network/ansible_host_config.yaml @@ -31,7 +31,7 @@ line: 'isolated_cores={{ _TUNED_CORES_ }}' when: _TUNED_CORES_|default("") != "" - - name: Tune-d provile activation + - name: Tune-d profile activation shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }} become: true when: _TUNED_PROFILE_NAME_|default("") != "" diff --git a/extraconfig/pre_network/config_then_reboot.yaml b/extraconfig/pre_network/config_then_reboot.yaml index 79cb7cbc..48ba5263 100644 --- a/extraconfig/pre_network/config_then_reboot.yaml +++ b/extraconfig/pre_network/config_then_reboot.yaml @@ -7,19 +7,6 @@ description: > parameters: server: type: string - deployment_actions: - default: ['CREATE', 'UPDATE'] - type: comma_delimited_list - description: > - List of stack actions that will trigger any deployments in this - templates. The actions will be an empty list of the server is in the - toplevel DeploymentServerBlacklist parameter's value. - -conditions: - deployment_actions_empty: - equals: - - {get_param: deployment_actions} - - [] resources: @@ -37,11 +24,6 @@ resources: name: SomeDeployment server: {get_param: server} config: {get_resource: SomeConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE actions: ['CREATE'] # Only do this on CREATE RebootConfig: @@ -62,9 +44,5 @@ resources: name: RebootDeployment server: {get_param: server} config: {get_resource: RebootConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE signal_transport: NO_SIGNAL diff --git a/extraconfig/pre_network/host_config_and_reboot.role.j2.yaml b/extraconfig/pre_network/host_config_and_reboot.role.j2.yaml index fe52ef7e..41d8f4f6 100644 --- a/extraconfig/pre_network/host_config_and_reboot.role.j2.yaml +++ b/extraconfig/pre_network/host_config_and_reboot.role.j2.yaml @@ -19,13 +19,6 @@ parameters: {{role}}HostCpusList: type: string default: "" - deployment_actions: - default: ['CREATE', 'UPDATE'] - type: comma_delimited_list - description: > - List of stack actions that will trigger any deployments in this - templates. The actions will be an empty list of the server is in the - toplevel DeploymentServerBlacklist parameter's value. parameter_group: - label: deprecated @@ -45,10 +38,6 @@ conditions: equals: - get_param: {{role}}TunedProfileName - "" - deployment_actions_empty: - equals: - - {get_param: deployment_actions} - - [] resources: @@ -73,11 +62,7 @@ resources: name: HostParametersDeployment server: {get_param: server} config: {get_resource: HostParametersConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE input_values: _KERNEL_ARGS_: {get_param: {{role}}KernelArgs} _TUNED_PROFILE_NAME_: {get_param: {{role}}TunedProfileName} @@ -103,11 +88,7 @@ resources: name: RebootDeployment server: {get_param: server} config: {get_resource: RebootConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE signal_transport: NO_SIGNAL outputs: diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml index 21309dd5..009a0879 100644 --- a/extraconfig/pre_network/host_config_and_reboot.yaml +++ b/extraconfig/pre_network/host_config_and_reboot.yaml @@ -11,22 +11,136 @@ parameters: type: json description: Role Specific parameters default: {} - deployment_actions: - default: ['CREATE', 'UPDATE'] + ServiceNames: type: comma_delimited_list + default: [] + IsolCpusList: + default: "0" + description: List of cores to be isolated by tuned + type: string + constraints: + - allowed_pattern: "[0-9,-]+" + OvsEnableDpdk: + default: false + description: Whether or not to configure enable DPDK in OVS + type: boolean + OvsDpdkCoreList: + description: > + List of cores to be used for DPDK lcore threads. Note, these threads + are used by the OVS control path for validator and handling functions. + type: string + constraints: + - allowed_pattern: "[0-9,-]*" + default: "" + OvsDpdkMemoryChannels: + description: Number of memory channels per socket to be used for DPDK + type: string + constraints: + - allowed_pattern: "[0-9]*" + default: "" + OvsDpdkSocketMemory: + default: "" + description: > + Sets the amount of hugepage memory to assign per NUMA node. It is + recommended to use the socket closest to the PCIe slot used for the + desired DPDK NIC. The format should be in "<socket 0 mem>, <socket 1 + mem>, <socket n mem>", where the value is specified in MB. For example: + "1024,0". + type: string + OvsDpdkDriverType: + default: "vfio-pci" + description: > + DPDK Driver type. Ensure the Overcloud NIC to be used for DPDK supports + this UIO/PMD driver. + type: string + OvsPmdCoreList: description: > - List of stack actions that will trigger any deployments in this - templates. The actions will be an empty list of the server is in the - toplevel DeploymentServerBlacklist parameter's value. + A list or range of CPU cores for PMD threads to be pinned to. Note, NIC + location to cores on socket, number of hyper-threaded logical cores, and + desired number of PMD threads can all play a role in configuring this + setting. These cores should be on the same socket where + OvsDpdkSocketMemory is assigned. If using hyperthreading then specify + both logical cores that would equal the physical core. Also, specifying + more than one core will trigger multiple PMD threads to be spawned which + may improve dataplane performance. + constraints: + - allowed_pattern: "[0-9,-]*" + type: string + default: "" + # DEPRECATED: the following options are deprecated and are currently maintained + # for backwards compatibility. They will be removed in the Queens cycle. + HostCpusList: + description: List of cores to be used for host process + type: string + constraints: + - allowed_pattern: "[0-9,-]+" + default: '0' + NeutronDpdkCoreList: + description: List of cores to be used for DPDK Poll Mode Driver + type: string + constraints: + - allowed_pattern: "[0-9,-]*" + default: '' + NeutronDpdkMemoryChannels: + description: Number of memory channels to be used for DPDK + type: string + constraints: + - allowed_pattern: "[0-9]*" + default: '' + 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]}, ""]}} - deployment_actions_empty: - equals: - - {get_param: deployment_actions} - - [] + # YAQL is enabled in conditions with https://review.openstack.org/#/c/467506/ + is_dpdk_config_required: + or: + - yaql: + expression: $.data.service_names.contains('neutron_ovs_dpdk_agent') + data: + service_names: {get_param: ServiceNames} + - {get_param: OvsEnableDpdk} + - {get_param: [RoleParameters, OvsEnableDpdk]} + is_reboot_config_required: + or: + - is_host_config_required + - is_dpdk_config_required + l_cores_empty: {equals: [{get_param: OvsDpdkCoreList}, '']} + pmd_cores_empty: {equals: [{get_param: OvsPmdCoreList}, '']} + mem_channels_empty: {equals: [{get_param: OvsDpdkMemoryChannels}, '']} + socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']} + driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']} + isol_cpus_empty: {equals: [{get_param: IsolCpusList}, '0']} resources: + RoleParametersValue: + type: OS::Heat::Value + properties: + type: json + value: + map_replace: + - map_replace: + - IsolCpusList: IsolCpusList + OvsDpdkCoreList: OvsDpdkCoreList + OvsDpdkMemoryChannels: OvsDpdkMemoryChannels + OvsDpdkSocketMemory: OvsDpdkSocketMemory + OvsDpdkDriverType: OvsDpdkDriverType + OvsPmdCoreList: OvsDpdkCoreList + - values: {get_param: [RoleParameters]} + - values: + IsolCpusList: {if: [isol_cpus_empty, {get_param: HostCpusList}, {get_param: IsolCpusList}]} + OvsDpdkCoreList: {if: [l_cores_empty, {get_param: HostCpusList}, {get_param: OvsDpdkCoreList}]} + OvsDpdkMemoryChannels: {if: [mem_channels_empty, {get_param: NeutronDpdkMemoryChannels}, {get_param: OvsDpdkMemoryChannels}]} + OvsDpdkSocketMemory: {if: [socket_mem_empty, {get_param: NeutronDpdkSocketMemory}, {get_param: OvsDpdkSocketMemory}]} + OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]} + OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]} + HostParametersConfig: type: OS::Heat::SoftwareConfig condition: is_host_config_required @@ -48,19 +162,51 @@ resources: name: HostParametersDeployment server: {get_param: server} config: {get_resource: HostParametersConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE input_values: _KERNEL_ARGS_: {get_param: [RoleParameters, KernelArgs]} _TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]} - _TUNED_CORES_: {get_param: [RoleParameters, HostIsolatedCoreList]} + _TUNED_CORES_: {get_param: [RoleParameters, IsolCpusList]} + + 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, OvsDpdkCoreList]} + $PMD_CORES: {get_attr: [RoleParametersValue, value, OvsPmdCoreList]} + $MEMORY_CHANNELS: {get_attr: [RoleParametersValue, value, OvsDpdkMemoryChannels]} + $SOCKET_MEMORY: {get_attr: [RoleParametersValue, value, OvsDpdkSocketMemory]} + + 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: | @@ -73,16 +219,12 @@ 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} config: {get_resource: RebootConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE + actions: ['CREATE'] # Only do this on CREATE signal_transport: NO_SIGNAL outputs: diff --git a/extraconfig/tasks/ssh/host_public_key.yaml b/extraconfig/tasks/ssh/host_public_key.yaml index 02fdbf1c..e4ba0cc4 100644 --- a/extraconfig/tasks/ssh/host_public_key.yaml +++ b/extraconfig/tasks/ssh/host_public_key.yaml @@ -7,13 +7,6 @@ parameters: server: description: ID of the node to apply this config to type: string - deployment_actions: - default: ['CREATE', 'UPDATE'] - type: comma_delimited_list - description: > - List of stack actions that will trigger any deployments in this - templates. The actions will be an empty list of the server is in the - toplevel DeploymentServerBlacklist parameter's value. resources: SshHostPubKeyConfig: @@ -35,7 +28,6 @@ resources: properties: config: {get_resource: SshHostPubKeyConfig} server: {get_param: server} - actions: {get_param: deployment_actions} outputs: |