DVR: Increase the link-local address pair range

The current dvr_fip_ns.py file has FIP_LL_SUBNET configured
with a subnet prefixlen of /23 which only allows 255 pairs of
link-local addresses to be generated. If the number of routers
per-node increases beyond the 255 limit it raises an assertion.

This patch increases the link-local address cidr to be a /18
to allow for 8K routers. The new range was chosen to not
overlap with the original, allowing for in-place upgrades
without affecting existing routers.

Closes-Bug: #1562110
Change-Id: I6e11622ea9cc74b1d2428757f16aa0de504ac31a
(cherry picked from commit 7b1b8c2de5)
This commit is contained in:
Swaminathan Vasudevan 2016-03-25 12:38:13 -07:00 committed by Brian Haley
parent 1edafdd8f5
commit 8810a2535b
3 changed files with 5 additions and 3 deletions

View File

@ -31,7 +31,7 @@ FIP_2_ROUTER_DEV_PREFIX = 'fpr-'
ROUTER_2_FIP_DEV_PREFIX = namespaces.ROUTER_2_FIP_DEV_PREFIX
# Route Table index for FIPs
FIP_RT_TBL = 16
FIP_LL_SUBNET = '169.254.30.0/23'
FIP_LL_SUBNET = '169.254.64.0/18'
# Rule priority range for FIPs
FIP_PR_START = 32768
FIP_PR_END = FIP_PR_START + 40000

View File

@ -74,7 +74,9 @@ class ItemAllocator(object):
self.pool.update(self.remembered.values())
self.remembered.clear()
if not self.pool:
# More than 256 routers on a compute node!
# The number of address pairs allocated from the
# pool depends upon the prefix length specified
# in FIP_LL_SUBNET
raise RuntimeError("Cannot allocate item of type:"
" %s from pool using file %s"
% (self.ItemClass, self.state_file))

View File

@ -31,7 +31,7 @@ VALID_AUTH_TYPES = ['AH', 'PASS']
HA_DEFAULT_PRIORITY = 50
PRIMARY_VIP_RANGE_SIZE = 24
# TODO(amuller): Use L3 agent constant when new constants module is introduced.
FIP_LL_SUBNET = '169.254.30.0/23'
FIP_LL_SUBNET = '169.254.64.0/18'
KEEPALIVED_SERVICE_NAME = 'keepalived'
GARP_MASTER_DELAY = 60