commit 7da9b8d6145a62d53b9f33b8fc33a1810fed94c4
Author: Kevin Benton <email address hidden>
Date: Wed Jan 27 05:18:13 2016 -0800
Raise RetryRequest on policy parent not found
During a port list operation, a port and its parent network
may be concurrently deleted from the database after they have
been retrieved from the DB but before policy is enforced.
Then when the policy engine tries to do a get_network to check
network ownership for a port on a network that no longer exists,
it will encounter a NetworkNotFound exception from the core plugin.
This exception was being propagated all of the way up to the whole
API operation as a 404, which made no sense in the context of a
port list.
This patch adjusts the logic to catch any NotFound exceptions during
this processing and convert them into a RetryRequest to trigger the
API to restart the operation. At this point the objects will be gone
from the database so the problematic items will not be passed to the
policy engine for enforcement.
Closes-Bug: #1528031
Change-Id: I89d12fe0767e1c7ecb68138b5f6f17aa68a68769
(cherry picked from commit 77de9653fd60a802b11f157972f7b3e81497e8a7)
Reviewed: https:/ /review. openstack. org/273957 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=7da9b8d6145 a62d53b9f33b8fc 33a1810fed94c4
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit 7da9b8d6145a62d 53b9f33b8fc33a1 810fed94c4
Author: Kevin Benton <email address hidden>
Date: Wed Jan 27 05:18:13 2016 -0800
Raise RetryRequest on policy parent not found
During a port list operation, a port and its parent network
may be concurrently deleted from the database after they have
been retrieved from the DB but before policy is enforced.
Then when the policy engine tries to do a get_network to check
network ownership for a port on a network that no longer exists,
it will encounter a NetworkNotFound exception from the core plugin.
This exception was being propagated all of the way up to the whole
API operation as a 404, which made no sense in the context of a
port list.
This patch adjusts the logic to catch any NotFound exceptions during
this processing and convert them into a RetryRequest to trigger the
API to restart the operation. At this point the objects will be gone
from the database so the problematic items will not be passed to the
policy engine for enforcement.
Closes-Bug: #1528031 7ecb68138b5f6f1 7aa68a68769 2b11f157972f7b3 e81497e8a7)
Change-Id: I89d12fe0767e1c
(cherry picked from commit 77de9653fd60a80