[IPAM] During port bulk creation, if a "fixed_ip" request is incorrect, the previous IPAM allocations generated are not deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Rodolfo Alonso |
Bug Description
Related bugzilla: https:/
During the port bulk creation, before the port DB registers are created, there is a method that pre-creates the port MAC address and the IPAM allocations [1]. If one of the requested "fixed_ips" is incorrect (for example, the IP address is out of the subnet CIDR), the method will raise an exception. However, the IPAM allocations created previously will remain in the DB.
Steps:
$ openstack create network net1
$ openstack subnet create --subnet-range 10.0.50.0/24 --network net1 snet1
$ OS_TOKEN=`openstack token issue | grep "| id" | tr -s " " | cut -f4 -d" "`
$ curl -H "X-Auth-
-d '{"ports": [
{
"fixed_ips": [{"subnet_id": <subnet_id>, "ip_address": "10.0.50.10"}]},
{
"fixed_ips": [{"subnet_id": <subnet_id>, "ip_address": "10.0.51.20"}]}]}'
Note that the second IP address 10.0.51.20 is not in the subnet CIDR 10.0.50.0/24. The IPAM allocation for 10.0.50.10 (the first request), will remain in the DB.
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
importance: | Undecided → Medium |
Changed in neutron: | |
status: | New → Confirmed |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/898549
Review: https:/