Comment 2 for bug 1861674

Revision history for this message
Zhengdong Wu (zhengdong.wu) wrote :

When we set l3_ha=true and gateway is not in exteranl network subnet cidr:

root@devstack-controller:~# neutron subnet-list |grep pub
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
| 941fd5a3-897e-4c24-9f26-0c51e3ced2e6 | public-subnet | ebe65b5c2dc848e58e55b9640acf1279 | 192.168.5.128/25 | {"start": "192.168.5.130", "end": "192.168.5.254"} |
| d9bddf94-c4a6-47d2-b1ab-c30f2f85b177 | ipv6-public-subnet | ebe65b5c2dc848e58e55b9640acf1279 | 2001:db8::/64 | {"start": "2001:db8::3", "end": "2001:db8::ffff:ffff:ffff:ffff"} |
root@devstack-controller:~# neutron subnet-show 941fd5a3-897e-4c24-9f26-0c51e3ced2e6
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+-------------------+----------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------+
| allocation_pools | {"start": "192.168.5.130", "end": "192.168.5.254"} |
| cidr | 192.168.5.128/25 |
| created_at | 2019-05-24T10:08:29Z |
| description | |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 192.168.4.129 |
| host_routes | |
| id | 941fd5a3-897e-4c24-9f26-0c51e3ced2e6 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | public-subnet |
| network_id | d08a0c6f-27a9-4921-912b-c6884833c5da |
| project_id | ebe65b5c2dc848e58e55b9640acf1279 |
| revision_number | 2 |
| service_types | |
| subnetpool_id | |
| tags | |
| tenant_id | ebe65b5c2dc848e58e55b9640acf1279 |
| updated_at | 2020-02-05T04:58:34Z |
+-------------------+----------------------------------------------------+

create a router and see ns route rules:

root@devstack-controller:/etc/neutron# ip netns exec qrouter-0dccc9f9-cf9f-4fa3-860f-7790401ddf89 route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ha-96299f41-44
169.254.192.0 0.0.0.0 255.255.192.0 U 0 0 0 ha-96299f41-44
192.168.5.128 0.0.0.0 255.255.255.128 U 0 0 0 qg-5461e5d9-ad

It should has default route like "0.0.0.0 192.168.4.129 0.0.0.0 UG 0 0 0 qg-78bcb3cf-49" here.

And when l3_ha=false, the route rules in router ns:

Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.4.129 0.0.0.0 UG 0 0 0 qg-78bcb3cf-49
192.168.4.129 0.0.0.0 255.255.255.255 UH 0 0 0 qg-78bcb3cf-49
192.168.5.128 0.0.0.0 255.255.255.128 U 0 0 0 qg-78bcb3cf-49

I test this in stein version, but I think it also has problem in master branch.