summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-03-06 17:15:37 -0500
committerTim Rozet <trozet@redhat.com>2017-03-24 09:59:11 -0400
commita6c64087de2edee87ac8a98438359afcdac844e2 (patch)
tree732c9385308dbd2b404373f34e0744370487e882 /lib
parent5f50df9743156ea805256e2f65815ed0075881f6 (diff)
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 <trozet@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/overcloud-deploy-functions.sh57
-rw-r--r--lib/python/apex/deploy_settings.py2
2 files changed, 41 insertions, 18 deletions
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" <<EOI
- sed -i "/ComputeKernelArgs:/c\ ComputeKernelArgs: '$kernel_args'" ${ENV_FILE}
- sed -i "$ a\resource_registry:\n OS::TripleO::NodeUserData: first-boot.yaml" ${ENV_FILE}
- sed -i "/NovaSchedulerDefaultFilters:/c\ NovaSchedulerDefaultFilters: 'RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter'" ${ENV_FILE}
+ sed -i "/ComputeKernelArgs:/c\ ComputeKernelArgs: '$kernel_args'" ${ENV_FILE}
+ sed -i "$ a\resource_registry:\n OS::TripleO::NodeUserData: first-boot.yaml" ${ENV_FILE}
+ sed -i "/NovaSchedulerDefaultFilters:/c\ NovaSchedulerDefaultFilters: 'RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter'" ${ENV_FILE}
EOI
+
+ if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' && "$ovs_dpdk_perf_flag" == "True" ]]; then
+ for ovs_option in ${!ovs_option_heat_arr[@]}; do
+ if [ -n "${!ovs_option}" ]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/${ovs_option_heat_arr[$ovs_option]}:/c\ ${ovs_option_heat_arr[$ovs_option]}: ${!ovs_option}" ${ENV_FILE}
+EOI
+ fi
+ done
+ fi
fi
if [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
@@ -344,17 +363,21 @@ if ! openstack stack list | grep CREATE_COMPLETE 1>/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" <<EOI || (echo "DPDK config failed, exiting..."; exit 1)
source stackrc
set -o errexit
for node in \$(nova list | grep novacompute | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
-echo "Running DPDK test app on \$node"
+echo "Checking DPDK status and bringing up br-phy on \$node"
ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
set -o errexit
-sudo dpdk_helloworld --no-pci
-sudo dpdk_nic_bind -s
+sudo dpdk-devbind -s
+sudo ifup br-phy
+if [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
+ echo "Restarting openvswitch agent to pick up VXLAN tunneling"
+ sudo systemctl restart neutron-openvswitch-agent
+fi
EOF
done
EOI
diff --git a/lib/python/apex/deploy_settings.py b/lib/python/apex/deploy_settings.py
index 9fb4c6f7..dc58d764 100644
--- a/lib/python/apex/deploy_settings.py
+++ b/lib/python/apex/deploy_settings.py
@@ -34,7 +34,7 @@ OPT_DEPLOY_SETTINGS = ['performance',
'odl_vpp_routing_node']
VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage']
-VALID_PERF_OPTS = ['kernel', 'nova', 'vpp']
+VALID_PERF_OPTS = ['kernel', 'nova', 'vpp', 'ovs']
VALID_DATAPLANES = ['ovs', 'ovs_dpdk', 'fdio']