aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/pre_network/host_config_and_reboot.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'extraconfig/pre_network/host_config_and_reboot.yaml')
-rw-r--r--extraconfig/pre_network/host_config_and_reboot.yaml122
1 files changed, 60 insertions, 62 deletions
diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml
index 31d0c1e0..87dbeaec 100644
--- a/extraconfig/pre_network/host_config_and_reboot.yaml
+++ b/extraconfig/pre_network/host_config_and_reboot.yaml
@@ -9,17 +9,11 @@ parameters:
type: string
RoleParameters:
type: json
- description: Role Specific parameters
+ description: Parameters specific to the role
default: {}
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
@@ -47,12 +41,6 @@ parameters:
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: >
A list or range of CPU cores for PMD threads to be pinned to. Note, NIC
@@ -67,6 +55,21 @@ parameters:
- allowed_pattern: "[0-9,-]*"
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.
+ EnableDpdkDeploymentActions:
+ default: ['CREATE']
+ type: comma_delimited_list
+ description: >
+ Exposing the DPDK deployment action, it may be required to run DPDK
+ config during an upgrade. By default DPDK will be enabled during the
+ CREATE action only. But on cases when it requires for certain migration,
+ it may be required to run it for UPDATE action too.
# DEPRECATED: the following options are deprecated and are currently maintained
# for backwards compatibility. They will be removed in the Queens cycle.
HostCpusList:
@@ -91,29 +94,16 @@ parameters:
default: ''
description: Memory allocated for each socket
type: string
- NeutronDpdkDriverType:
- default: "vfio-pci"
- description: DPDK Driver type
- 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:
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:
or:
- yaql:
- expression: $.data.service_names.contains('neutron_ovs_dpdk_agent')
- data:
- service_names: {get_param: ServiceNames}
- - {get_param: OvsEnableDpdk}
- - {get_param: [RoleParameters, OvsEnableDpdk]}
+ expression: $.data.service_names.contains('neutron_ovs_dpdk_agent')
+ data:
+ service_names: {get_param: ServiceNames}
+ - {equals: [{get_param: [RoleParameters, OvsEnableDpdk]}, true]}
is_reboot_config_required:
or:
- is_host_config_required
@@ -122,8 +112,6 @@ conditions:
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']}
deployment_actions_empty:
equals:
- {get_param: deployment_actions}
@@ -137,19 +125,15 @@ resources:
value:
map_replace:
- map_replace:
- - IsolCpusList: IsolCpusList
- OvsDpdkCoreList: OvsDpdkCoreList
+ - OvsDpdkCoreList: OvsDpdkCoreList
OvsDpdkMemoryChannels: OvsDpdkMemoryChannels
OvsDpdkSocketMemory: OvsDpdkSocketMemory
- OvsDpdkDriverType: OvsDpdkDriverType
- OvsPmdCoreList: OvsDpdkCoreList
+ OvsPmdCoreList: OvsPmdCoreList
- 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:
@@ -183,6 +167,40 @@ resources:
_TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]}
_TUNED_CORES_: {get_param: [RoleParameters, IsolCpusList]}
+ RebootConfig:
+ type: OS::Heat::SoftwareConfig
+ condition: is_reboot_config_required
+ properties:
+ group: script
+ config: |
+ #!/bin/bash
+ # Stop os-collect-config to avoid any race collecting another
+ # deployment before reboot happens
+ systemctl stop os-collect-config.service
+ /sbin/reboot
+
+ RebootDeployment:
+ type: OS::Heat::SoftwareDeployment
+ depends_on: HostParametersDeployment
+ 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
+ signal_transport: NO_SIGNAL
+
+ # With OvS2.7 (which is default with pike), ovs-vswitchd will start dpdk
+ # immediately after setting dpdk-init (behaviour change from ovs2.6).
+ # Starting of DPDK require the huge page configuration to be enabled. So
+ # reboot will happen before DPDK config and we don't need an explicity
+ # restart after dpdk-init as true because of the behavior change.
+ # TODO(skramaja): Dependency is that till the service file workaround, is
+ # maintained, restart of ovs is required.
EnableDpdkConfig:
type: OS::Heat::SoftwareConfig
condition: is_dpdk_config_required
@@ -218,6 +236,8 @@ resources:
sed -i 's/start_daemon \"\$OVS_VSWITCHD_PRIORITY\"/umask 0002 \&\& start_daemon \"$OVS_VSWITCHD_PRIORITY\"/' $ovs_ctl_path
fi
+ systemctl daemon-reload
+ systemctl restart openvswitch
# DO NOT use --detailed-exitcodes
puppet apply --logdest console \
@@ -239,38 +259,16 @@ resources:
EnableDpdkDeployment:
type: OS::Heat::SoftwareDeployment
condition: is_dpdk_config_required
+ depends_on: RebootDeployment
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_reboot_config_required
- properties:
- group: script
- config: |
- #!/bin/bash
- # Stop os-collect-config to avoid any race collecting another
- # deployment before reboot happens
- systemctl stop os-collect-config.service
- /sbin/reboot
-
- RebootDeployment:
- type: OS::Heat::SoftwareDeployment
- depends_on: HostParametersDeployment
- 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
- signal_transport: NO_SIGNAL
+ - {get_param: EnableDpdkDeploymentActions}
outputs:
result: