raising Maximum number of ports exceeded is wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
python-neutronclient |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
When neutron API in nova calls create_port(), it looks for exceptions. Any 409 is turned into 'Maximum number of ports exceeded'. This is a horrible assumption. Neutron can return 409s for more than just this reason.
Another case where neutron returns a 409 is this:
2014-07-22 18:10:27.583 26577 INFO neutron.
This can occur when the request to create a port includes the mac address to use (as happens w/ baremetal/ironic in nova) and neutron for some reason still has things assigned with that mac.
This is the offending code:
174 except neutron_
175 # NOTE(mriedem): OverQuota in neutron is a 409
176 if e.status_code == 409:
177 LOG.warning(
178 raise exception.
Changed in python-neutronclient: | |
status: | New → Confirmed |
Changed in nova: | |
status: | Confirmed → Triaged |
Changed in python-neutronclient: | |
assignee: | nobody → Matt Riedemann (mriedem) |
status: | Confirmed → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in python-neutronclient: | |
milestone: | none → 2.3.6 |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
See related bug 1331353.
In the long long ago python- neutronclient sucked at raising specific exceptions so we were basically left with NeutronClientEx ception and the status code, unless you also wanted to parse the error message, which isn't good either.
Things are a bit better now but we have to get specific exceptions in the client to handle them in nova, we have a few patches in nova already for similar issues.