Skip to content

Commit

Permalink
Add internalapi routes for scenario A adoption
Browse files Browse the repository at this point in the history
Doing data-plane adoption while testing scenario A (different
subnets between wallaby and next-gen) will result in connectivity
problem since pods will try to reach old CP using default route
(since both CP are on different subnets) and won't be able to reach it.

Adding this route in internalapi to support data-plane
adoption scenario A gates.

Currently only one route can be added, if needed logic can be improved
to include more than one route.

Ref: OSPRH-5602
  • Loading branch information
averdagu committed Jan 8, 2025
1 parent 00f5fc0 commit 21a840e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CLEANUP_DIR_CMD ?= rm -Rf
# be also cloned from OPENSTACK_REPO/OPENSTACK_BRANCH.
CHECKOUT_FROM_OPENSTACK_REF ?= false

NETWORK_INTERNALAPI_ROUTE ?=
NETWORK_INTERNALAPI_ADDRESS_PREFIX ?= 172.17.0
NETWORK_STORAGE_ADDRESS_PREFIX ?= 172.18.0
NETWORK_TENANT_ADDRESS_PREFIX ?= 172.19.0
Expand Down Expand Up @@ -2308,6 +2309,7 @@ nncp_with_retries: ## Deploy NNCP with retries
nncp: export INTERFACE=${NNCP_INTERFACE}
nncp: export BRIDGE_NAME=${NNCP_BRIDGE}
nncp: export INTERNALAPI_PREFIX=${NETWORK_INTERNALAPI_ADDRESS_PREFIX}
nncp: export INTERNALAPI_ROUTE=${NETWORK_INTERNALAPI_ROUTE}
nncp: export NNCP_INTERNALAPI_HOST_ROUTES=${INTERNALAPI_HOST_ROUTES}
nncp: export STORAGE_PREFIX=${NETWORK_STORAGE_ADDRESS_PREFIX}
nncp: export NNCP_STORAGE_HOST_ROUTES=${STORAGE_HOST_ROUTES}
Expand Down
12 changes: 12 additions & 0 deletions scripts/gen-netatt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ if [ -n "$IPV4_ENABLED" ]; then
"range_start": "${INTERNALAPI_PREFIX}.30",
"range_end": "${INTERNALAPI_PREFIX}.70"
EOF_CAT
# In the data-plane adoption scenario A (where different IP subnet ranges
# between next-gen and wallaby are used) the net-attach-def needs additional routes.
# The 172.17.1 is a hardcoded IP used on all scenario A gates.
if [ -n "$INTERNALAPI_ROUTE" ]; then
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
"routes": [
{
"dst": "${INTERNALAPI_ROUTE}"
}
]
EOF_CAT
fi
elif [ -n "$IPV6_ENABLED" ]; then
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
"range": "fd00:bbbb::/64",
Expand Down

0 comments on commit 21a840e

Please sign in to comment.