l3_router: no support for multiple router gateways to floating_net
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
networking-vpp |
Fix Released
|
Undecided
|
Naveen Joy |
Bug Description
When trying to route traffic from 2 separate subnets to the same floating network,
vpp-agent (L3 router) crashes since VPP can't handle overlapping addresses on the same interface.
I will follow up with a short investigation in a different comment, for now here are the steps to reproduce this.
#######
# Steps to reproduce the issue
#######
neutron net-create opnfv_fuel_
neutron subnet-create --name 10_10_10 opnfv_fuel_
neutron router-create opnfv_fuel_
neutron router-
neutron router-gateway-set opnfv_fuel_
neutron net-create opnfv_fuel_
neutron subnet-create --name 11_11_11 opnfv_fuel_
neutron router-create opnfv_fuel_
neutron router-
neutron router-gateway-set opnfv_fuel_
#######
# tail -1 /var/log/
#######
2019-01-04 14:12:51.530 16704 CRITICAL networking_
#######
# service vpp status (relevant line corresponding to above err)
#######
Jan 04 14:12:51 gtw01 vnet[16287]: ip4_add_
#######
# Openstack floating network
#######
openstack network create --external --default --provider-
--provider-
# 10.0.2.254 is a valid gw on our TOR switch
openstack subnet create --gateway 10.0.2.254 --no-dhcp \
--allocation-pool start=10.
--network floating_net --subnet-range 10.0.2.0/24 floating_subnet
#######
# cat /etc/neutron/
#######
[DEFAULT]
core_plugin = neutron.
service_plugins = vpp-router,metering
#######
# cat /etc/neutron/
#######
[ml2]
type_drivers = flat,vlan
tenant_
mechanism_drivers = vpp
extension_
[ml2_type_flat]
flat_networks = *
[ml2_type_vlan]
network_vlan_ranges = physnet2:
[ml2_vpp]
jwt_signing = False
etcd_insecure_
l3_hosts = gtw01
enable_l3_ha = False
gpe_locators =
gpe_src_cidr =
enable_vpp_restart = False
etcd_pass =
etcd_user =
etcd_port = 4001
etcd_host = 172.16.10.36
physnets = physnet2:
#######
# cat /etc/vpp/
#######
unix {
cli-listen /run/vpp/cli.sock
log /var/log/vpp.log
full-coredump
nodaemon
startup-config /etc/vpp/
gid neutron
}
api-trace {
on
}
api-segment {
gid neutron
}
cpu {
main-core 1
}
dpdk {
socket-mem 1024
dev 0000:00:05.0
}
#######
# cat /etc/vpp/
#######
create tap host-if-name vpp_ext_tap host-bridge br-floating rx-ring-size 1024 tx-ring-size 1024
set interface state tap0 up
Changed in networking-vpp: | |
assignee: | nobody → Naveen Joy (najoy) |
status: | New → In Progress |
It is possible I am missing something obvious, in which case feel free to disregard my observations.
The current l3_router design implies creating (or reusing) a BVI loop device for each router [1], then trying to assign an IP address to it [2], corresponding to the Neutron-assigned gateway IP address of said router.
Although this works fine for one router, the second router will try to reuse the same BVI and assign an overlapping IP address in the same CIDR, hitting the VPP limitation via [3, 4].
This is clearly not going to change in VPP anytime soon, so l3_router should be adjusted accordingly.
I'm not exactly familiar with the codebase of either projects, but I did play around a bit with some hacks in this direction, trying to assign the gateway IP in the floating network outside VPP (i.e. on the Linux kernel side) with no idea about the implications on security et al. However that would require tracking routes for said IPs inside l3_router, which is just another rabbit hole ...
[1] https:/ /github. com/openstack/ networking- vpp/blob/ master/ networking_ vpp/agent/ server. py#L1834- L1838 /github. com/openstack/ networking- vpp/blob/ master/ networking_ vpp/agent/ server. py#L1892- L1894 /github. com/FDio/ vpp/blob/ master/ src/vnet/ interface_ api.c#L335 /github. com/FDio/ vpp/blob/ master/ src/vnet/ ip/ip4_ forward. c#L577- L581
[2] https:/
[3] https:/
[4] https:/