[L3][HA] race condition between first two router creations when tenant has no HA network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When the tenant creates the first HA router-1, neutron will try to create HA network for this project.
But during the HA network creation procedure, we assume it has 2 steps:
(1) create HA network
(2) create subnet for this HA network
another router-2 creation API call is comming, while HA network creation is just done the step (1).
This router-2 creation API can retrieve the project HA network, and the HA network has no subnet.
Because of the
"[Open Discussion] neutron can create port from network which has no subnet"
https:/
router-2 will create HA ports without fixed IP.
So this HA router-2 will not get UP forever in L3 agent side.
In our production environment, we see many times of such issue.
summary: |
- [L3][HA] race condition amoning router creations when tenant has no HA + [L3][HA] race condition first two router creations when tenant has no HA network |
summary: |
- [L3][HA] race condition first two router creations when tenant has no HA - network + [L3][HA] race condition between first two router creations when tenant + has no HA network |
description: | updated |
Changed in neutron: | |
importance: | Undecided → Medium |
This bug has been discussed during the Neutron drivers meeting, along with LP#2016197.
The proposal to fix LP#2016198 is to limit the creation of the "L3HARouterNetwork" DB resource [1][2]. The HA network is created per project. Only one network should be created at once. If we limit in the DB engine the number of "L3HARouterNetwork" per project, by making the "project_id" unique, we'll prevent the race condition.
[1]https:/ /github. com/openstack/ neutron/ blob/47d070c71e 795e41e698cdb27 8d99dcfb3448bde /neutron/ objects/ l3_hamode. py#L58 /github. com/openstack/ neutron/ blob/master/ neutron/ db/models/ l3ha.py# L62
[2]https:/