Skip to content

Commit 21a840e

Browse files
committed
Add internalapi routes for scenario A adoption
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
1 parent 00f5fc0 commit 21a840e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ CLEANUP_DIR_CMD ?= rm -Rf
4646
# be also cloned from OPENSTACK_REPO/OPENSTACK_BRANCH.
4747
CHECKOUT_FROM_OPENSTACK_REF ?= false
4848

49+
NETWORK_INTERNALAPI_ROUTE ?=
4950
NETWORK_INTERNALAPI_ADDRESS_PREFIX ?= 172.17.0
5051
NETWORK_STORAGE_ADDRESS_PREFIX ?= 172.18.0
5152
NETWORK_TENANT_ADDRESS_PREFIX ?= 172.19.0
@@ -2308,6 +2309,7 @@ nncp_with_retries: ## Deploy NNCP with retries
23082309
nncp: export INTERFACE=${NNCP_INTERFACE}
23092310
nncp: export BRIDGE_NAME=${NNCP_BRIDGE}
23102311
nncp: export INTERNALAPI_PREFIX=${NETWORK_INTERNALAPI_ADDRESS_PREFIX}
2312+
nncp: export INTERNALAPI_ROUTE=${NETWORK_INTERNALAPI_ROUTE}
23112313
nncp: export NNCP_INTERNALAPI_HOST_ROUTES=${INTERNALAPI_HOST_ROUTES}
23122314
nncp: export STORAGE_PREFIX=${NETWORK_STORAGE_ADDRESS_PREFIX}
23132315
nncp: export NNCP_STORAGE_HOST_ROUTES=${STORAGE_HOST_ROUTES}

scripts/gen-netatt.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ if [ -n "$IPV4_ENABLED" ]; then
122122
"range_start": "${INTERNALAPI_PREFIX}.30",
123123
"range_end": "${INTERNALAPI_PREFIX}.70"
124124
EOF_CAT
125+
# In the data-plane adoption scenario A (where different IP subnet ranges
126+
# between next-gen and wallaby are used) the net-attach-def needs additional routes.
127+
# The 172.17.1 is a hardcoded IP used on all scenario A gates.
128+
if [ -n "$INTERNALAPI_ROUTE" ]; then
129+
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
130+
"routes": [
131+
{
132+
"dst": "${INTERNALAPI_ROUTE}"
133+
}
134+
]
135+
EOF_CAT
136+
fi
125137
elif [ -n "$IPV6_ENABLED" ]; then
126138
cat >> ${DEPLOY_DIR}/internalapi.yaml <<EOF_CAT
127139
"range": "fd00:bbbb::/64",

0 commit comments

Comments
 (0)