create_port can succeed without returning fixed_ips on all requested subnets
Bug #1627480 reported by
Kevin Benton
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
James Anziano |
Bug Description
There looks to be a window when a port is being created that has requested fixed IPs on specific subnets where the subnet can be deleted and the port creation will return successfully without getting IPs on all requested subnets.
This interferes with the DHCP agent which expects to get IPs on the subnets it requests or an exception indicating that a subnet does not exist.
This is likely related to the fact that we allow automatic cascade deletes in our IP allocation data model when a subnet is deleted.
tags: | added: db l3-ipam-dhcp |
Changed in neutron: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: neutron-proactive-backport-potential |
Changed in neutron: | |
assignee: | nobody → James Anziano (janzian) |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/375791 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=d1fb4238306 f854ab610204a50 c5cdc20ea5c770
Committed: https:/
Submitter: Jenkins
Branch: master
commit d1fb4238306f854 ab610204a50c5cd c20ea5c770
Author: Kevin Benton <email address hidden>
Date: Thu Sep 22 23:38:33 2016 -0700
Fixes for missing IPs on subnets in DHCP agent
There is a race condition server-side where a port request containing orPort
a subnet_id is processed at the same time the subnet is being deleted,
the port operation may be successful without having a fixed IP on the
requested subnet. This patch makes the DHCP agent resillient to this
bug by checking the port response and raising a SubnetMismatchF
to trigger a resync if it doesn't have all of the requested subnet IDs.
Additionally, it avoids skipping assignment of IPv6 addresses to the
interface if they are stateless. The original logic to skip assignment
was only meant to be for SLAAC addresses.
Both of these issues were resulting in the KeyError observed in the
bug report.
Related-Bug: #1627480 309d6a0706e29fd bcc16f0b59d
Closes-Bug: #1624079
Change-Id: I85ef1f4d60efd0