diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-31 19:32:47 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-31 19:32:47 +0000 |
commit | 960b9802016a89bd1fa007a1d2a5d703d168fccd (patch) | |
tree | 75632dcd0b0fbad985c5474c429447afb98594a6 | |
parent | 865c65b8f43a909c94b1b50712b5baf088af9566 (diff) | |
parent | c3f9eaf0e47bb1907f0c310de9626b05ddf0b86c (diff) |
Merge "Enable Dpdk after rebooting with Hugepages for OvS2.7"
-rw-r--r-- | extraconfig/pre_network/host_config_and_reboot.yaml | 88 | ||||
-rw-r--r-- | releasenotes/notes/ovs-2-7-support-for-dpdk-fe665cf9c6b0a750.yaml | 5 |
2 files changed, 58 insertions, 35 deletions
diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml index 2f5fcdf7..5c7cc273 100644 --- a/extraconfig/pre_network/host_config_and_reboot.yaml +++ b/extraconfig/pre_network/host_config_and_reboot.yaml @@ -55,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: @@ -79,13 +94,6 @@ parameters: default: '' description: Memory allocated for each socket 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]}, ""]}} @@ -159,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 @@ -194,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 \ @@ -215,6 +259,7 @@ resources: EnableDpdkDeployment: type: OS::Heat::SoftwareDeployment condition: is_dpdk_config_required + depends_on: RebootDeployment properties: name: EnableDpdkDeployment server: {get_param: server} @@ -223,34 +268,7 @@ resources: if: - deployment_actions_empty - [] - - ['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: diff --git a/releasenotes/notes/ovs-2-7-support-for-dpdk-fe665cf9c6b0a750.yaml b/releasenotes/notes/ovs-2-7-support-for-dpdk-fe665cf9c6b0a750.yaml new file mode 100644 index 00000000..23f482a1 --- /dev/null +++ b/releasenotes/notes/ovs-2-7-support-for-dpdk-fe665cf9c6b0a750.yaml @@ -0,0 +1,5 @@ +--- +features: + - Added support for DPDK with OvS2.7, which requires huge page + configuration (with reboot) to be available before enabling DPDK. + |