neutron/neutron/tests/unit
Swaminathan Vasudevan 3794b4a83e Fixes Multiple External Networks issue with DVR
Current L3 agents can support more than one
external network when configured properly.

On DVR routers, router-gateway-set was
returning a 500 error, when two external
networks were configured in the system.

The problem resides in the scheduler where the
bind_router is called twice when the
reschedule_router is called from update_router.

The _schedule_router binds the snat
and the qrouter with the respective agents.

But after scheduling it does not return agent.

And in the case of two external networks, the
get_candidates always returns a valid candidate
to be processed and hence the bind_router is
called twice.

This patch fixes the _schedule_router function
and hence avoids the multiple calls to
bind_router.

This prevents the update_router from failing
and causing the nested rollback for the
transactions.

Change-Id: I24d44c60a3ea5bbc9e3f44aa5191deff315723ca
Closes-Bug: #1374473
2015-01-21 11:51:07 -08:00
..
agent Merge "Make L3 HA VIPs ordering consistent in keepalived.conf" 2015-01-13 06:29:14 +00:00
api Migrate to oslo.utils 2014-11-26 10:31:03 +01:00
bigswitch bigswitch: drop usage of SecurityGroupServerRpcApiMixin 2015-01-21 09:49:28 -05:00
brocade Migrate to oslo.context 2014-12-11 20:49:11 +01:00
cisco Updated keystone_admin conf section to reflect changes in middleware 2015-01-05 12:29:00 +01:00
db Merge "Support 'alive' filter for get_agents() in agents_db" 2015-01-15 08:52:08 +00:00
embrane tests: drop unit tests that only check default configuration values 2014-12-18 21:28:55 +01:00
extensions switch to oslo.serialization 2014-11-14 09:28:12 +00:00
hyperv Migrate to oslo.context 2014-12-11 20:49:11 +01:00
ibm Replace non-ovs_lib calls of run_vsctl with libary functions 2014-12-12 10:12:02 -07:00
linuxbridge moving vxlan module check to sanity checks and making practical 2015-01-06 14:42:38 -06:00
metaplugin Ensure test_metaplugin handles random hashseeds 2015-01-05 10:02:15 +00:00
ml2 Merge "Catch StaleDataError in update_device_down" 2015-01-20 22:35:02 +00:00
mlnx tests: drop unit tests that only check default configuration values 2014-12-18 21:28:55 +01:00
nec hacking: enable H238 (old style class declaration, use new style) 2015-01-12 23:46:11 +01:00
notifiers fix event_send for re-assign floating ip 2014-11-10 18:20:10 -08:00
nuage Use "if dict.get(key):" instead "if key in dict and dict[key]:" 2015-01-12 14:05:54 -08:00
ofagent Retry on unassigned ofport instead of treating it as a failure 2014-12-29 15:12:52 -07:00
oneconvergence Auto allocate gateway_ip even for SLAAC subnets 2014-12-09 15:47:05 +00:00
opencontrail Updated keystone_admin conf section to reflect changes in middleware 2015-01-05 12:29:00 +01:00
openvswitch Merge "Remove redundant tunnel ids from ovs agent" 2015-01-13 21:10:03 +00:00
plumgrid PLUMgrid plugin: Fix for delete subnet with admin context 2014-12-22 01:30:48 -08:00
services Merge "Backward compatibility for advanced services" 2014-12-18 20:18:05 +00:00
sriovnicagent Adds macvtap support 2014-10-21 11:57:44 +03:00
vmware make delete_router send delete_port to core_plugin 2015-01-15 16:19:08 +01:00
__init__.py Fix state_path in tests 2014-08-29 17:42:07 +03:00
_test_extension_portbindings.py Set vif_details to reflect enable_security_group 2014-09-21 17:41:38 +09:00
database_stubs.py Avoid unnecessary explicit str() conversion around exceptions 2014-12-16 11:19:09 +03:00
dummy_plugin.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
extension_stubs.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
test_agent_config.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
test_agent_ext_plugin.py tests: initialize admin context after super().setUp call 2014-12-15 12:09:55 +01:00
test_agent_linux_utils.py Add Process class helper to manage processes with namespace 2015-01-07 11:20:27 +01:00
test_agent_rpc.py Merge "Fix AttributeError during startup of ovs agent in DVR mode" 2014-12-19 02:49:58 +00:00
test_api_api_common.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
test_api_v2.py hacking: enable H238 (old style class declaration, use new style) 2015-01-12 23:46:11 +01:00
test_api_v2_extension.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
test_api_v2_resource.py Cleanup req_format in test_api_v2_resource 2014-12-17 13:02:54 +03:00
test_attributes.py Fix some assertEqual argument orders 2015-01-16 09:39:54 +09:00
test_auth.py Migrate to oslo.middleware 2014-11-26 22:12:21 +01:00
test_basetestcase.py Prevent SystemExits when running tests 2014-09-01 15:05:16 -07:00
test_common_log.py Use method's logger in log decorator 2014-07-15 11:08:33 +02:00
test_common_utils.py Validate network config (vlan) 2014-10-22 10:29:33 -07:00
test_config.py tests: drop unit tests that only check default configuration values 2014-12-18 21:28:55 +01:00
test_db_migration.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
test_db_plugin.py Merge "Correct _test_delete_ports_by_device_id_second_call_failure" 2015-01-15 17:51:39 +00:00
test_db_plugin_level.py Refactor plugin setup helpers out of test.base 2014-08-25 14:44:27 +02:00
test_debug_commands.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
test_dhcp_agent.py tests: don't restore stopped mock that is set in setUp() 2015-01-14 16:22:52 +01:00
test_dhcp_rpc.py Improve performance of get_active_networks_info 2014-12-15 16:20:21 +08:00
test_dhcp_scheduler.py Improve test coverage of dhcp agent scheduling 2015-01-20 15:24:28 +05:30
test_extension_allowedaddresspairs.py Fixed test test_update_port_security_off_address_pairs 2014-12-15 00:13:01 -08:00
test_extension_ext_gw_mode.py Allow reading a tenant router's external IP 2014-10-01 06:55:27 -07:00
test_extension_ext_net.py Remove XML support 2014-10-24 15:18:49 +00:00
test_extension_extended_attribute.py remove openvswitch plugin 2014-10-01 21:16:27 -07:00
test_extension_extradhcpopts.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
test_extension_extraroute.py Remove XML support 2014-10-24 15:18:49 +00:00
test_extension_firewall.py Remove XML support 2014-10-24 15:18:49 +00:00
test_extension_pnet.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
test_extension_portsecurity.py UTs: Disable auto deletion of ports/subnets/nets 2014-09-09 07:09:02 -07:00
test_extension_security_group.py Change description of default security group 2014-11-27 07:27:51 +00:00
test_extensions.py switch to oslo.serialization 2014-11-14 09:28:12 +00:00
test_hacking.py Update hacking to 0.10 2015-01-12 23:46:06 +01:00
test_iptables_firewall.py IpsetManager refactoring 2014-12-06 18:21:43 +01:00
test_iptables_manager.py Allow IptablesManager to manage mangle table 2015-01-12 09:45:01 +00:00
test_ipv6.py Fix IPv6 Subnet Slaac Check 2015-01-12 15:18:09 +08:00
test_l3_agent.py Refactor the _get_external_device_interface_name method 2015-01-16 00:58:14 +00:00
test_l3_dvr.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
test_l3_plugin.py Use "if dict.get(key):" instead "if key in dict and dict[key]:" 2015-01-12 14:05:54 -08:00
test_l3_schedulers.py Fixes Multiple External Networks issue with DVR 2015-01-21 11:51:07 -08:00
test_linux_daemon.py Do not run neutron-ns-metadata-proxy as root on L3 agent 2014-12-24 01:21:44 +01:00
test_linux_dhcp.py Merge "Specify prefix length for IPv6 subnets" 2015-01-16 08:17:14 +00:00
test_linux_external_process.py Fix pid file location to avoid I->J changes that break metadata 2014-10-01 16:31:27 -07:00
test_linux_interface.py hacking: enable H238 (old style class declaration, use new style) 2015-01-12 23:46:11 +01:00
test_linux_ip_lib.py Create arping helper in ip_lib 2015-01-15 05:43:10 +00:00
test_metadata_agent.py Move metadata agent entry to its own file 2015-01-09 19:49:45 -08:00
test_metadata_namespace_proxy.py Do not run neutron-ns-metadata-proxy as root on L3 agent 2014-12-24 01:21:44 +01:00
test_netns_cleanup.py Move agent cleanup scripts to cmd module 2015-01-14 10:01:44 -08:00
test_neutron_context.py add auth token to context 2014-08-12 11:17:21 +09:00
test_neutron_manager.py Refactor plugin setup helpers out of test.base 2014-08-25 14:44:27 +02:00
test_ovs_cleanup.py Move agent cleanup scripts to cmd module 2015-01-14 10:01:44 -08:00
test_policy.py Migrate to oslo.utils 2014-11-26 10:31:03 +01:00
test_post_mortem_debug.py Cleanup recent generalization in post mortem debugger 2014-12-04 15:28:11 +01:00
test_provider_configuration.py Backward compatibility for advanced services 2014-12-18 09:27:28 -08:00
test_quota_ext.py Remove XML support 2014-10-24 15:18:49 +00:00
test_router_processing_queue.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
test_security_groups_rpc.py Migrate to oslo.concurrency 2015-01-15 21:01:06 +01:00
test_servicetype.py Remove XML support 2014-10-24 15:18:49 +00:00
test_wsgi.py hacking: enable H238 (old style class declaration, use new style) 2015-01-12 23:46:11 +01:00
testlib_api.py Remove XML support 2014-10-24 15:18:49 +00:00
testlib_plugin.py Use oslo function for parsing bool from env var 2014-12-02 14:40:07 +00:00