neutron/neutron/db
John Schwarz 8e2f6ce56a Check for l3 agents count before router update
When updating a legacy router to be an HA, it's possible that there are
less than the minimum required l3 agents available. In this case an
exception will be raised to indicate this, but some of the changes will
already be in committed. The effect is that the router will be in an
invalid partial state between legacy and HA.

This patch simply checks that there are enough l3 agents before starting
to convert the router to HA. This adds a single DB query for each
router-update from legacy to HA, but saves a bunch of others in case the
transition should not take place.

Closes-Bug: #1609665
Change-Id: I566b17003f6d9b4c8205c0586f742795012da29c
(cherry picked from commit a167a3e20a)
2017-01-12 01:58:25 +00:00
..
availability_zone Trival: Remove unused logging import 2015-12-26 12:49:56 +08:00
metering Merge "Remove references to model_base through models_v2" 2016-01-10 13:43:40 +00:00
migration Merge "neutron-db-manage: revision: fail for --autogenerate and branch" into stable/mitaka 2016-07-16 02:04:21 +00:00
qos Qos policy RBAC DB setup and migration 2016-02-26 17:03:59 +00:00
quota Check for StaleData errors in retry decorator 2016-09-21 09:48:15 +02:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
address_scope_db.py Correlate address scope with network 2016-02-22 22:46:18 -05:00
agents_db.py Refactor the rpc callback version discovery mechanism 2016-06-09 13:43:08 +00:00
agentschedulers_db.py Suppresses a warning when no agents are configured 2016-08-24 16:15:08 +00:00
allowedaddresspairs_db.py Wrong usage of "a" 2015-12-30 01:15:16 +08:00
api.py Check for StaleData errors in retry decorator 2016-09-21 09:48:15 +02:00
bgp_db.py Fixes KeyError while updating bgp peer 2016-09-19 11:53:15 +05:30
bgp_dragentscheduler_db.py BGP Dynamic Routing: introduce BgpDrAgent 2016-02-18 10:46:55 -08:00
common_db_mixin.py Get rid of double-join to rbac_entries without filter 2016-10-11 07:04:39 +00:00
db_base_plugin_common.py Use subqueries for rbac_entries and subnets<->network 2016-12-22 09:15:37 +00:00
db_base_plugin_v2.py Outerjoin to networks for port ownership filter 2016-03-18 09:36:31 +00:00
dns_db.py Don't load DNS integration in l3_router_plugin 2016-07-30 18:43:24 -05:00
dvr_mac_db.py Clear DVR MAC on last agent deletion from host 2016-04-16 07:00:51 +00:00
external_net_db.py Fix update target tenant RBAC external path 2016-05-11 01:19:15 -07:00
extradhcpopt_db.py Remove references to model_base through models_v2 2016-01-06 16:12:29 -07:00
extraroute_db.py Fix the context passed to get_subnets in _validate_routes 2016-03-11 00:39:32 +00:00
flavors_db.py Remove references to model_base through models_v2 2016-01-06 16:12:29 -07:00
ipam_backend_mixin.py Allow auto-addressed ips deletion on port update 2016-08-16 16:40:37 +03:00
ipam_non_pluggable_backend.py Trigger dhcp port_update for new auto_address subnets 2016-02-04 08:26:07 +00:00
ipam_pluggable_backend.py fix port address allocation for auto-addr subnet 2016-09-14 14:01:58 +00:00
l3_agentschedulers_db.py DVR: Moving router from dvr_snat node removes the qrouters 2016-05-20 18:02:28 +00:00
l3_attrs_db.py Ensure agent binding modules are loaded 2016-01-10 14:09:38 +00:00
l3_db.py Fixes port device_id/device_owner change in failed operation 2016-08-30 09:44:01 +08:00
l3_dvr_db.py DVR: Fix allowed_address_pair port binding with delayed fip 2016-06-13 18:54:46 +00:00
l3_dvr_ha_scheduler_db.py HA for DVR - Neutron Server side code changes 2016-02-08 16:49:58 -07:00
l3_dvrscheduler_db.py After a migration clean up the floating ip on the source host 2016-06-13 16:38:17 +00:00
l3_gwmode_db.py Trival: Remove unused logging import 2015-12-26 12:49:56 +08:00
l3_hamode_db.py Check for l3 agents count before router update 2017-01-12 01:58:25 +00:00
l3_hascheduler_db.py Avoid trace in _notify_l3_agent_ha_port_update 2016-11-15 11:22:02 +00:00
model_base.py Delay description association proxy construction 2016-03-06 02:24:14 -08:00
models_v2.py Use subqueries for rbac_entries and subnets<->network 2016-12-22 09:15:37 +00:00
netmtu_db.py Move network MTU from core REST API to extension API 2015-04-02 12:48:56 -04:00
network_ip_availability_db.py IP Availability: remove unused imports 2016-03-01 07:06:10 -08:00
portbindings_base.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
portbindings_db.py Remove unnecessary 'IN vs ==' sql query branches 2015-03-21 09:39:06 -07:00
portsecurity_db.py port security: gracefully handle resources with no bindings 2016-03-30 17:15:56 +00:00
portsecurity_db_common.py port security: gracefully handle resources with no bindings 2016-03-30 17:15:56 +00:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py Catch DBDuplicateEntry errors in RBAC code 2016-02-29 15:35:45 -08:00
rbac_db_models.py Use network RBAC feature for external access 2016-02-29 19:05:26 -08:00
securitygroups_db.py add PROTO_NUM_IPV6_ICMP for _validate_port_range 2016-06-16 16:02:17 +02:00
securitygroups_rpc_base.py Using LOG.warning replace LOG.warn 2016-03-10 11:02:45 -08:00
servicetype_db.py Force service provider relationships to load 2015-12-10 01:26:51 -06:00
sqlalchemytypes.py Add custom SQLAlchemy type for MACAddress 2016-03-15 17:31:55 +01:00
sqlalchemyutils.py Trival: Remove unused logging import 2015-12-26 12:49:56 +08:00
standardattrdescription_db.py Add a description field to all standard resources 2016-03-05 02:29:35 +00:00
tag_db.py Add filter for resource tag 2016-03-01 20:47:12 +00:00
vlantransparent_db.py Moving VLAN Transparency support from core to extension 2015-04-08 08:35:13 -07:00