]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix race condition with firewall deletion
authorEugene Nikanorov <enikanorov@mirantis.com>
Tue, 10 Jun 2014 03:55:40 +0000 (07:55 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Tue, 10 Jun 2014 03:55:40 +0000 (07:55 +0400)
commit58e6bb5893186517edafe1a4d51710c1362bc9cc
tree9cba74787740903116386fe62c7a97f1a7081e04
parentb44fa145d0fc8d26166f1f8fd5f57d109796e6c8
Fix race condition with firewall deletion

In some cases when firewall is created and then deleted in short
period of time, there could be a race condition of firewall status
changes. Agent may change firewall status from PENDING_DELETE to ACTIVE
because the agent has just set it up on the backend.
Delete request then is not properly served and firewall remains in ERROR
state and can't be deleted at all.

To fix this changing status from PENDING_DELETE is not allowed.
Deleting firewall in ERROR state is allowed.

Change-Id: Iec3cfcb1e03b33dda8e1f10ca51bd9b61fa8030d
Closes-Bug: #1328162
neutron/services/firewall/fwaas_plugin.py
neutron/tests/unit/services/firewall/test_fwaas_plugin.py