From 4cdcfa9d933dba8ffd43e034be00e58a5b9501ab Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Mon, 6 Mar 2017 17:15:37 -0500 Subject: Fixes OVS DPDK scenarios This fixes nosdn OVS DPDK scenarios to work with OVS 2.6. It also adds support for the ODL DPDK scenario. OVS DPDK configuration is done during preconfig on compute nodes. All nodes make use of first boot script to get kernel params like hugepages. The network settings are modified to use real nic names for the virtual network settings file. This is required due to a timing bug with os-net-config and using first-boot script. The network settings file also contains the UIO driver to use with DPDK. JIRA: APEX-314 opnfv-tht-pr: 117 Change-Id: I46b6fca71ecec38981968133ba2411f64d7c6445 Signed-off-by: Tim Rozet --- lib/overcloud-deploy-functions.sh | 57 ++++++++++++++++++++++++++------------ lib/python/apex/deploy_settings.py | 2 +- 2 files changed, 41 insertions(+), 18 deletions(-) (limited to 'lib') diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index 8362964d..f9b66191 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -13,6 +13,12 @@ function overcloud_deploy { local num_compute_nodes local num_control_nodes + local dpdk_cores pmd_cores socket_mem ovs_dpdk_perf_flag ovs_option_heat_arr + declare -A ovs_option_heat_arr + + ovs_option_heat_arr['dpdk_cores']=OvsDpdkCoreList + ovs_option_heat_arr['pmd_cores']=PmdCoreList + ovs_option_heat_arr['socket_memory']=OvsDpdkSocketMemory # OPNFV Default Environment and Network settings DEPLOY_OPTIONS+=" -e ${ENV_FILE}" @@ -56,6 +62,8 @@ function overcloud_deploy { echo -e "${blue}INFO: SDN Controller disabled...will deploy nosdn scenario${reset}" if [ "${deploy_options_array['vpp']}" == 'True' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-vpp.yaml" + elif [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ovs-dpdk.yaml" fi SDN_IMAGE=opendaylight else @@ -122,11 +130,7 @@ EOF -a overcloud-full.qcow2 if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/dpdk_rpms/*" \ - --run-command "sed -i '/RuntimeDirectoryMode=.*/d' /usr/lib/systemd/system/openvswitch-nonetwork.service" \ - --run-command "printf \"%s\\n\" RuntimeDirectoryMode=0775 Group=qemu UMask=0002 >> /usr/lib/systemd/system/openvswitch-nonetwork.service" \ - --run-command "sed -i 's/\\(^\\s\\+\\)\\(start_daemon "$OVS_VSWITCHD_PRIORITY"\\)/\\1umask 0002 \\&\\& \\2/' /usr/share/openvswitch/scripts/ovs-ctl" \ - -a overcloud-full.qcow2 + sed -i "/OS::TripleO::ComputeExtraConfigPre:/c\ OS::TripleO::ComputeExtraConfigPre: ./ovs-dpdk-preconfig.yaml" network-environment.yaml fi EOI @@ -164,19 +168,34 @@ EOI fi if [ -n "${deploy_options_array['performance']}" ]; then + ovs_dpdk_perf_flag="False" for option in "${performance_options[@]}" ; do - arr=($option) - # use compute's kernel settings for all nodes for now. - if [ "${arr[0]}" == "Compute" ] && [ "${arr[1]}" == "kernel" ]; then - kernel_args+=" ${arr[2]}=${arr[3]}" - fi + arr=($option) + # use compute's kernel settings for all nodes for now. + if [ "${arr[0]}" == "Compute" ] && [ "${arr[1]}" == "kernel" ]; then + kernel_args+=" ${arr[2]}=${arr[3]}" + fi + if [ "${arr[0]}" == "Compute" ] && [ "${arr[1]}" == "ovs" ]; then + eval "${arr[2]}=${arr[3]}" + ovs_dpdk_perf_flag="True" + fi done ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" </dev/null; then fi EOI - # Configure DPDK + # Configure DPDK and restart ovs agent after bringing up br-phy if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <