From 949f5ada608961fd05435e01bd9d06757b6c62c5 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Mon, 15 Mar 2021 18:25:04 +0100 Subject: [PATCH] Add route to IPv6 private subnets in ML2/OVN Enable IPv6 private subnet routing in ML2/OVN, it uses the behavior that already exists in ML2/OVS: add a route from the devstack node to the CIDRs of the default IPv6 subnet pool. Any IPv6 subnet created using the default subnet pool and plugged into the default router is reachable from the host (ex: ipv6-private-subnet). Change-Id: I02ca1d94e9f4d5ad4a06182f5ac9a2434941cf08 --- lib/neutron_plugins/services/l3 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3 index 75a3567096..5d339a00aa 100644 --- a/lib/neutron_plugins/services/l3 +++ b/lib/neutron_plugins/services/l3 @@ -392,8 +392,8 @@ function _neutron_configure_router_v6 { openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID fi - # This logic is specific to using the l3-agent for layer 3 - if is_service_enabled q-l3 || is_service_enabled neutron-l3; then + # This logic is specific to using OVN or the l3-agent for layer 3 + if ([[ $Q_AGENT == "ovn" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then # if the Linux host considers itself to be a router then it will # ignore all router advertisements # Ensure IPv6 RAs are accepted on interfaces with a default route. @@ -420,6 +420,11 @@ function _neutron_configure_router_v6 { # Configure interface for public bridge sudo ip -6 addr replace $ipv6_ext_gw_ip/$ipv6_cidr_len dev $ext_gw_interface + # Any IPv6 private subnet that uses the default IPV6 subnet pool + # and that is plugged into the default router (Q_ROUTER_NAME) will + # be reachable from the devstack node (ex: ipv6-private-subnet). + # Some scenario tests (such as octavia-tempest-plugin) rely heavily + # on this feature. local replace_range=${SUBNETPOOL_PREFIX_V6} if [[ -z "${SUBNETPOOL_V6_ID}" ]]; then replace_range=${FIXED_RANGE_V6}