commit e2da84b76b661557bf170be5983cd98bf9b7eec1
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/273956 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=e2da84b76b6 61557bf170be598 3cd98bf9b7eec1
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit e2da84b76b66155 7bf170be5983cd9 8bf9b7eec1
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