Race condition when adding two subnet with same cidr to router
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Fernando Royo |
Bug Description
When two subnets with the same cidr are connected to a router, the second request should fail with an error like this:
BadRequest: resources.
But if those connections are triggered simultaneously, both subnets finally are connected to the router without raising the previous BadRequest.
A simple script like this allow to replicate the situation described:
echo "create resources"
openstack router create r0
openstack network create n0-A
openstack subnet create sn0-A --network n0-A --subnet-range 10.100.0.0/24
openstack network create n0-B
openstack subnet create sn0-B --network n0-B --subnet-range 10.100.0.0/24
echo "connect subnets to routers"
openstack router add subnet r0 sn0-A&
openstack router add subnet r0 sn0-B
as result:
(overcloud) [stack@undercloud-0 ~]$ openstack router show r0 -c interfaces_info -f value; done
[{'port_id': '171028ae-
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in neutron: | |
assignee: | nobody → Fernando Royo (froyoredhat) |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/859143
Review: https:/