neutron/neutron/tests/unit
Sławek Kapłoński 39b9197f6f Don't set administratively disabled ports as ACTIVE
There was a race condition during port update to disable it.
In case when neutron-server receives port update call to set
admin_state_down on port, it sends PORT_UPDATE notification
to agents.

Then both L2 and DHCP agents start doing their job with port.
L2 agent asks neutron-server about device details and during
processing this call server sets port's status to DOWN if
its admin_state_up = False.
Problem is that sometimes just after that, DHCP agent will send
to neutron server notification that provisioning for this port
is finished.
As there is no any other provisioning block in db (because it
is just port update) neutron-server is setting port's status
to ACTIVE.

This patch fixes this issue by allowing to transition to
ACTIVE only ports which are administratively enabled.

Change-Id: If506e0ff68fc49748f19618470c85901339a419b
Closes-Bug: #1757089
(cherry picked from commit 2a1319ab7a)
2018-06-21 07:40:49 +00:00
..
agent Pass parameters when create eventlet.wsgi server 2018-02-02 19:11:17 +00:00
api Stop making IP-specific provider rules in SG code 2017-04-13 19:54:02 +00:00
callbacks Reduce the number of debug traces emitted by registry callbacks 2016-09-07 20:10:16 -07:00
cmd More efficiently clean up OVS ports 2018-01-29 08:15:55 -06:00
common Fixes import_modules_recursively for Windows 2017-08-25 18:05:39 +00:00
core_extensions Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
db tests: port test_port_presence_prevents_network_rbac_policy_deletion 2018-06-01 09:48:59 +00:00
debug Change external_network_bridge default to '' 2016-08-02 11:35:47 -07:00
extensions Always pass device_owner to _ipam_get_subnets() 2018-02-17 18:32:21 +00:00
hacking Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-11-22 02:15:19 +00:00
ipam OVO for Ipam(Allocation,Subnet,Pool) 2017-01-19 19:25:01 +00:00
notifiers Turn nova notifier into a proper rate limiter 2017-03-20 20:48:58 +00:00
objects Support protocol numbers in security group API 2018-01-10 09:29:23 +01:00
plugins Don't set administratively disabled ports as ACTIVE 2018-06-21 07:40:49 +00:00
quota Stop using legacy facade 2017-01-19 13:02:33 +04:00
scheduler Avoid redundant HA port creation during migration 2017-09-11 19:57:01 +00:00
services Don't create new QoS policy during update operation 2017-11-27 20:21:29 +00:00
tests Remove recursion from import_modules_recursively 2016-09-30 21:48:50 +00:00
__init__.py Avoid eventlet monkey patching for the tempest plugin 2016-04-29 22:47:24 -05:00
_test_extension_portbindings.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
dummy_plugin.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
extension_stubs.py Use ExtensionDescriptor from neutron-lib 2016-12-02 14:16:06 -05:00
test_auth.py Fix params order in assertEqual 2016-01-13 18:24:04 +05:30
test_context.py Stop using legacy facade 2017-01-19 13:02:33 +04:00
test_manager.py neutron-lib: use CORE from neutron lib constants 2016-12-26 00:56:42 -08:00
test_opts.py Fix the sriov agent config group name 2016-05-05 16:16:08 +08:00
test_policy.py Neutron server was not compatible with member actions 2017-06-19 10:32:48 +02:00
test_service.py Fix that api_workers=0 doesn't spawn any api workers 2016-07-29 05:40:05 -04:00
test_worker.py Move AgentStatusCheckWorker to PeriodicWorker 2016-11-17 15:31:19 -08:00
test_wsgi.py Pass parameters when create eventlet.wsgi server 2018-02-02 19:11:17 +00:00
testlib_api.py Merge "Stop using legacy facade" 2017-01-20 08:23:22 +00:00