Comment 2 for bug 1528031

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/273034
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=77de9653fd60a802b11f157972f7b3e81497e8a7
Submitter: Jenkins
Branch: master

commit 77de9653fd60a802b11f157972f7b3e81497e8a7
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