commit 76d59ebcb9ace58d9364877da25f1aa66fb759d8
Author: Matt Riedemann <email address hidden>
Date: Thu May 25 15:00:24 2017 -0400
Handle conflict from neutron when addFloatingIP fails
Neutron can raise a Conflict exception when attempting
to associate a floating IP to a server when the fixed
address is already associated to another floating IP.
This has always resulted in a 400 response, however, it
would also trace an ERROR in the nova-api logs, which is
something we shouldn't be doing for an expected type of
failure.
This handles the Conflict in the neutronv2 API client code
and re-raises an exception that the REST API controller code
can handle and return as a 400 without the stacktrace in the
logs.
Reviewed: https:/ /review. openstack. org/469672 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=76d59ebcb9a ce58d9364877da2 5f1aa66fb759d8
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 76d59ebcb9ace58 d9364877da25f1a a66fb759d8
Author: Matt Riedemann <email address hidden>
Date: Thu May 25 15:00:24 2017 -0400
Handle conflict from neutron when addFloatingIP fails
Neutron can raise a Conflict exception when attempting
to associate a floating IP to a server when the fixed
address is already associated to another floating IP.
This has always resulted in a 400 response, however, it
would also trace an ERROR in the nova-api logs, which is
something we shouldn't be doing for an expected type of
failure.
This handles the Conflict in the neutronv2 API client code
and re-raises an exception that the REST API controller code
can handle and return as a 400 without the stacktrace in the
logs.
Conflicts:
nova/ tests/unit/ network/ test_neutronv2. py
NOTE(mriedem): The conflict is due to not having change c8e5e76a2fe42b3 5e8d6c9267e04a2 in Newton.
I740c49111b
Change-Id: I27d3241300f75e 2aa79a32348a384 3e09123cb10 c5673ebd3fd3e5d af039caacc) c58a0c9a43d44a6 e9d12ddc4c)
Closes-Bug: #1693576
(cherry picked from commit 452f21183f2f80c
(cherry picked from commit cea9f71634a161d