Public bug reported: If I use heat to create a set of networks, each with its own subnet, sometimes I will get an error from Neutron that there is an overlap.
There is an example heat template attached. In my environment, this will fail about 1 or 2 times in 10. The heat template does: for X in seq 0 10 create network X assign subnet 172.16.X.0/24 to network X One of the stacks will get an error on one of the subnets, indicating: Requested Subnet With Cidr: 172.16.7.0/24 For Network: 73f99807-0b2a- 49d3-8d11-B7bd74d02f4d Overlaps With Another Subnet. This is in turn coming from _validate_subnet_cidr() in db/ipam_backend_mixin.py. What is happening is that the 'new_subnet_cidr' passed in is matching against itself. Since I have 'allow_overlapping_ips=true', it does: subnet_list = network.subnets but, in the failure case, this subnet is already there. In the 'no failure case' it is not yet there. I have 3 heat API servers, and 72 heat workers (3 servers). The api servers are round-robin load balanced I just (2016-06-24) reproduced this against the master/head from github (so midway between mitaka and newton). I'm not sure if there is some missing locking, but for sure this is a race condition. I have ipam_driver unset If i comment out the exception in _validate_subnet_cidr() then it works OK. ** Affects: neutron Importance: Undecided Status: New ** Attachment added: "Example heat template" https://bugs.launchpad.net/bugs/1596075/+attachment/4689902/+files/t.yml -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1596075 Title: Neutron confused about overlapping subnet creation Status in neutron: New Bug description: If I use heat to create a set of networks, each with its own subnet, sometimes I will get an error from Neutron that there is an overlap. There is an example heat template attached. In my environment, this will fail about 1 or 2 times in 10. The heat template does: for X in seq 0 10 create network X assign subnet 172.16.X.0/24 to network X One of the stacks will get an error on one of the subnets, indicating: Requested Subnet With Cidr: 172.16.7.0/24 For Network: 73f99807-0b2a- 49d3-8d11-B7bd74d02f4d Overlaps With Another Subnet. This is in turn coming from _validate_subnet_cidr() in db/ipam_backend_mixin.py. What is happening is that the 'new_subnet_cidr' passed in is matching against itself. Since I have 'allow_overlapping_ips=true', it does: subnet_list = network.subnets but, in the failure case, this subnet is already there. In the 'no failure case' it is not yet there. I have 3 heat API servers, and 72 heat workers (3 servers). The api servers are round-robin load balanced I just (2016-06-24) reproduced this against the master/head from github (so midway between mitaka and newton). I'm not sure if there is some missing locking, but for sure this is a race condition. I have ipam_driver unset If i comment out the exception in _validate_subnet_cidr() then it works OK. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1596075/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp