neutron/neutron/tests/unit
Kevin Benton 96c67e22f9 Only ensure admin state on ports that exist
The linux bridge agent was calling ensure_port_admin state
unconditionally on ports in treat_devices_added_or_updated.
This would cause it to throw an error on interfaces that
didn't exist so it would restart the entire processing loop.

If another port was being updated in the same loop before this
one, that port would experience a port status life-cycle of
DOWN->BUILD->ACTIVE->BUILD->ACTIVE
                   ^ <--- Exception in unrelated port causes cycle
                          to start over again.

This causes the bug below because the first active transition will
cause Nova to boot the VM. At this point tempest tests expect the
ports that belong to the VM to be in the ACTIVE state so it filters
Neutron port list calls with "status=ACTIVE". Therefore tempest would
not get any ports back and assume there was some kind of error with
the port and bail.

This patch just makes sure the admin state call is skipped if the port
doesn't exist and it includes a basic unit test to prevent a regression.

Closes-Bug: #1523638
Change-Id: I5330c6111cbb20bf45aec9ade7e30d34e8dd16ca
2016-02-04 14:07:03 -08:00
..
agent Set default value for dnsmasq_local_resolv to False 2016-01-27 16:42:11 +00:00
api Fail if required extensions are missing 2016-01-29 16:20:07 -08:00
callbacks Provide kwargs for callback abort 2016-01-12 21:48:05 +00:00
cmd Don't decide web_framework before config parse 2016-01-22 17:44:35 -08:00
common Fix module's import order 2016-01-22 06:38:42 -08:00
core_extensions QoS core extension: fixed dict extension when QoS policy is unset 2015-08-08 15:44:27 +02:00
db Merge "Only prevent l3 port deletion if router exists" 2016-02-04 18:47:12 +00:00
debug tests: stop validating neutronclient in neutron-debug tests 2016-01-14 06:46:45 +00:00
extensions Merge "Fix required extensions mix-up" 2016-01-29 08:32:29 +00:00
hacking Unify using assertIsInstance 2016-01-15 00:06:03 +08:00
ipam Fix module's import order 2016-01-22 06:38:42 -08:00
notifiers Fix module's import order 2016-01-22 06:38:42 -08:00
objects Move helper methods to create resorces to test_base 2016-01-21 19:23:14 +00:00
plugins Only ensure admin state on ports that exist 2016-02-04 14:07:03 -08:00
quota Fix module's import order 2016-01-22 06:38:42 -08:00
scheduler Merge "Fix remove_router_from_l3_agent for 'dvr' mode agent" 2016-02-04 19:16:31 +00:00
services Fix module's import order 2016-01-22 06:38:42 -08:00
tests Fix params order in assertEqual 2016-01-13 18:24:04 +05:30
__init__.py oslo: migrate to namespace-less import paths 2015-02-05 15:09:32 +01:00
_test_extension_portbindings.py Fix module's import order 2016-01-22 06:38:42 -08:00
dummy_plugin.py Fixed a bunch of typos throughout Neutron 2015-10-30 08:54:41 -05:00
extension_stubs.py Fail if required extensions are missing 2016-01-29 16:20:07 -08:00
test_auth.py Fix params order in assertEqual 2016-01-13 18:24:04 +05:30
test_context.py Support Unicode request_id on Python 3 2015-11-27 16:21:16 +01:00
test_manager.py Pecan controller loads service plugins 2016-01-12 12:28:54 -08:00
test_policy.py Raise RetryRequest on policy parent not found 2016-01-27 05:23:38 -08:00
test_service.py Refactor TestRpcWorker and TestWorkerService 2015-06-16 15:49:48 +03:00
test_wsgi.py Make sure we return unicode strings for process output 2015-11-20 16:49:51 +01:00
testlib_api.py Improve fixture usage. 2015-07-01 14:53:48 +12:00