neutron/neutron
Slawek Kaplonski 4a45e1adeb Choose random value for HA routes' vr_id
HA routers are using keepalived and needs to have virtual_router_id
configured. As routers which belongs to same tenant are using same
ha network, those values have to be different for each router.

Before this patch this value was always taken as first available value
from available_vr_ids range.
In some (rare) cases, when more than one router is created in parallel
for same tenant it may happen that those routers would have same vr_id
choosen so keepalived would treat them as single application and only
one router would be ACTIVE on one of L3 agents.

This patch changes this behaviour that now random value from available
vr_ids will be chosen instead of taking first value always.
That should mittigate this rare race condition that it will be (almost)
not noticable for users.

However, proper fix should be probably done as some additional
constraint in database layer. But such solution wouldn't be possible to
backport to stable branches so I decided to propose this easy patch
first.

Conflicts:
    neutron/db/l3_hamode_db.py

Change-Id: Idb0ed744e54976dca23593fb2d7317bf77442e65
Related-Bug: #1823314
(cherry picked from commit a8d0f557d5)
(cherry picked from commit ee2ed681c4)
(cherry picked from commit 72c9a7ef84)
2019-04-12 16:04:20 +00:00
..
agent Merge "Change duplicate OVS bridge datapath-ids" into stable/ocata 2019-04-10 11:26:53 +00:00
api Block port update from unbound DHCP agent 2019-02-05 15:24:55 +00:00
callbacks Merge "Routed networks IPv4 inventory in Nova GRP" 2017-01-24 22:37:41 +00:00
cmd More efficiently clean up OVS ports 2018-01-29 08:15:55 -06:00
common Fix eventlet imports issue 2018-06-02 09:57:26 +00:00
conf [OVS] Add mac-table-size to be set on each ovs bridge 2018-06-21 07:41:03 +00:00
core_extensions Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
db Choose random value for HA routes' vr_id 2019-04-12 16:04:20 +00:00
debug Replace device owners hard coded strings to neutron_lib constants 2016-07-12 04:11:35 -04:00
extensions Enhance tag mechanism 2017-02-06 10:09:05 +00:00
hacking Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
ipam Reduce IP address collision during port creating 2018-07-20 10:36:07 +00:00
locale Imported Translations from Zanata 2017-10-31 07:43:29 +00:00
notifiers Turn nova notifier into a proper rate limiter 2017-03-20 20:48:58 +00:00
objects Revert "Ensure _get_changed_synthetic_fields() return updatable fields" 2018-06-22 19:15:28 +00:00
pecan_wsgi [Pecan] Fix custom tenant_id project_id matching 2017-06-14 16:47:09 +00:00
plugins Do state report after setting start_flag on OVS restart 2019-04-11 18:23:20 +00:00
privileged Add capabilities for privsep 2018-10-29 19:42:40 +00:00
quota Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
scheduler Avoid redundant HA port creation during migration 2017-09-11 19:57:01 +00:00
server neutron-rpc-server fails with no plugins loaded 2017-06-14 11:01:52 +00:00
services Fix meter-label-rule creation 2018-04-16 16:34:22 +00:00
tests Do state report after setting start_flag on OVS restart 2019-04-11 18:23:20 +00:00
__init__.py Hacking rule to check i18n usage 2016-03-30 21:28:37 -04:00
_i18n.py
auth.py
context.py Correctly set project_name 2017-01-20 16:11:00 -05:00
manager.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
neutron_plugin_base_v2.py Revert "Revert "Remove threading before process forking"" 2016-06-02 21:26:08 +00:00
opts.py XenAPI: Support daemon mode for rootwrap 2017-01-19 07:33:43 +00:00
policy.py Neutron server was not compatible with member actions 2017-06-19 10:32:48 +02:00
service.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
version.py
worker.py Move AgentStatusCheckWorker to PeriodicWorker 2016-11-17 15:31:19 -08:00
wsgi.py Pass parameters when create eventlet.wsgi server 2018-02-02 19:11:17 +00:00