yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89579
[Bug 1987666] [NEW] Race condition when adding two subnet with same cidr to router
Public bug reported:
When two subnets with the same cidr are connected to a router, the
second request should fail with an error like this:
BadRequest: resources._ipv4_gateway_interface: Bad router request: Cidr
10.100.130.0/24 of subnet 41626435-77b8-4858-9594-a6709e2de5c5 overlaps
with cidr 10.100.130.0/24 of subnet cd6566de-add9-4129-9f5e-5b99cc57194c
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-3a0d-4690-86fd-09bf3cf9fabe', 'ip_address': '10.100.0.1', 'subnet_id': 'b1f1cfb0-3d8d-41ae-b5e4-4839f4c5d7a4'}, {'port_id': '46596629-a1bc-49d6-903e-45cd27ba6b22', 'ip_address': '10.100.0.1', 'subnet_id': '1f463853-487e-4aeb-b0ec-cd43048bf692'}]
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1987666
Title:
Race condition when adding two subnet with same cidr to router
Status in neutron:
New
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._ipv4_gateway_interface: Bad router request:
Cidr 10.100.130.0/24 of subnet 41626435-77b8-4858-9594-a6709e2de5c5
overlaps with cidr 10.100.130.0/24 of subnet cd6566de-
add9-4129-9f5e-5b99cc57194c
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-3a0d-4690-86fd-09bf3cf9fabe', 'ip_address': '10.100.0.1', 'subnet_id': 'b1f1cfb0-3d8d-41ae-b5e4-4839f4c5d7a4'}, {'port_id': '46596629-a1bc-49d6-903e-45cd27ba6b22', 'ip_address': '10.100.0.1', 'subnet_id': '1f463853-487e-4aeb-b0ec-cd43048bf692'}]
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1987666/+subscriptions
Follow ups