Fix neutron-openvswitch-agent-init script

Using local variables outside of function is not allowed
in bash. During adding route it tries to delete cached
route and fails with "Not found" because it can delete only
user created routes, so we need to omit Cached routes
in ovs/route/show listing.

Change-Id: Ifc8da7fc36206f7ebd2e6198dbf192a5a40261af
This commit is contained in:
MirgDenis 2020-10-13 12:26:24 +03:00 committed by Arina Stebenkova
parent 44be41440c
commit 27e12b88ad
3 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Neutron description: OpenStack-Helm Neutron
name: neutron name: neutron
version: 0.2.5 version: 0.2.6
home: https://docs.openstack.org/neutron/latest/ home: https://docs.openstack.org/neutron/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources: sources:

View File

@ -444,13 +444,13 @@ EOF
# loop over all nics # loop over all nics
echo $DPDK_CONFIG | jq -r -c '.bridges[]' | \ echo $DPDK_CONFIG | jq -r -c '.bridges[]' | \
while IFS= read -r br; do while IFS= read -r br; do
local bridge_name=$(get_dpdk_config_value ${br} '.name') bridge_name=$(get_dpdk_config_value ${br} '.name')
local tunnel_underlay_vlan=$(get_dpdk_config_value ${br} '.tunnel_underlay_vlan') tunnel_underlay_vlan=$(get_dpdk_config_value ${br} '.tunnel_underlay_vlan')
if [[ "${bridge_name}" == "${tunnel_interface}" ]]; then if [[ "${bridge_name}" == "${tunnel_interface}" ]]; then
# Route the tunnel traffic via the physical bridge # Route the tunnel traffic via the physical bridge
if [[ -n "${LOCAL_IP}" && -n "${PREFIX}" ]]; then if [[ -n "${LOCAL_IP}" && -n "${PREFIX}" ]]; then
if [[ -n $(ovs-appctl -t ${OVS_CTL} ovs/route/show | grep "${LOCAL_IP}") ]]; then if [[ -n $(ovs-appctl -t ${OVS_CTL} ovs/route/show | grep "${LOCAL_IP}" | grep -v '^Cached:') ]]; then
ovs-appctl -t ${OVS_CTL} ovs/route/del "${LOCAL_IP}"/"${PREFIX}" ovs-appctl -t ${OVS_CTL} ovs/route/del "${LOCAL_IP}"/"${PREFIX}"
fi fi
ovs-appctl -t ${OVS_CTL} ovs/route/add "${LOCAL_IP}"/"${PREFIX}" "${tunnel_interface}" ovs-appctl -t ${OVS_CTL} ovs/route/add "${LOCAL_IP}"/"${PREFIX}" "${tunnel_interface}"

View File

@ -19,4 +19,5 @@ neutron:
- 0.2.3 Mount rabbitmq TLS secret - 0.2.3 Mount rabbitmq TLS secret
- 0.2.4 Add Ussuri release support - 0.2.4 Add Ussuri release support
- 0.2.5 Use rootwrap daemon - 0.2.5 Use rootwrap daemon
- 0.2.6 Fix neutron agent-init script
... ...