yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #92958
[Bug 2039550] [NEW] [IPAM] During port bulk creation, if a "fixed_ip" request is incorrect, the previous IPAM allocations generated are not deleted
Public bug reported:
Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2244365
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-Token:$OS_TOKEN" -X POST http://192.168.10.100:9696/networking/v2.0/ports
-d '{"ports": [
{"network_id": <net_id>,
"fixed_ips": [{"subnet_id": <subnet_id>, "ip_address": "10.0.50.10"}]},
{"network_id": <net_id>,
"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.
[1]https://github.com/openstack/neutron/blob/2bc9c3833627da0dfdf901e15f78b9be397014e0/neutron/plugins/ml2/plugin.py#L1621-L1660
** Affects: neutron
Importance: Medium
Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)
** Changed in: neutron
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2039550
Title:
[IPAM] During port bulk creation, if a "fixed_ip" request is
incorrect, the previous IPAM allocations generated are not deleted
Status in neutron:
New
Bug description:
Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2244365
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-Token:$OS_TOKEN" -X POST http://192.168.10.100:9696/networking/v2.0/ports
-d '{"ports": [
{"network_id": <net_id>,
"fixed_ips": [{"subnet_id": <subnet_id>, "ip_address": "10.0.50.10"}]},
{"network_id": <net_id>,
"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.
[1]https://github.com/openstack/neutron/blob/2bc9c3833627da0dfdf901e15f78b9be397014e0/neutron/plugins/ml2/plugin.py#L1621-L1660
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2039550/+subscriptions
Follow ups