[FWaaS] Unit test race condition in creating/updating firewall

Bug #1622694 reported by Nate Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Adit Sarfaty

Bug Description

The FWaaS unit test neutron_fwaas.tests.unit.services.firewall.test_fwaas_plugin.TestFirewallPluginBase.test_update_firewall_shared_fails_for_non_admin creates a firewall, and then tries an update. If that update occurs before the creation is completed, then the router is still in PENDING_UPDATE state and a successful return code is returned. Since the test is expecting exc.HTTPForbidden.code (HTTP 403), this means the test fails. This looks like a race condition, but it should be handled properly.

Tags: fwaas
Changed in neutron:
assignee: nobody → Victor Howard (victor-r-howard)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/561461

Changed in neutron:
assignee: Victor Howard (victor-r-howard) → Adit Sarfaty (asarfaty)
status: Confirmed → In Progress
Revision history for this message
Adit Sarfaty (asarfaty) wrote :

This unit tests is invalid since the firewall (v1) object does not support 'shared' attribute anyway.
Deleting this test.

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

Reviewed: https://review.openstack.org/561461
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=f11b1a8b68cb2ef52d0c431cf37ff277f8d0438e
Submitter: Zuul
Branch: master

commit f11b1a8b68cb2ef52d0c431cf37ff277f8d0438e
Author: Adit Sarfaty <email address hidden>
Date: Sun Apr 15 15:52:20 2018 +0300

    Remove firewall (v1) shared attribute from tests

    The V1 firewall object does not support 'shared' attribute.
    This patch removes this attribute from the unit tests, and delete
    the already skipped test test_update_firewall_shared_fails_for_non_admin
    which is irrelevant.

    Change-Id: Ib9091bba9a8a3f5c04562304477c20506b2c91dc
    Closes-Bug: #1622694

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-fwaas 13.0.0.0b1

This issue was fixed in the openstack/neutron-fwaas 13.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.