Currently if a single network node is active in the system, gateway chassis for the routers would be scheduled on that node. However, when a new node is added to the system, neither rescheduling nor rebalancing occur automatically. This makes the router created on the first node to be not in HA mode.
Side-effects of this behavior include:
Gateway scheduling has been proposed in [2]. However, rebalancing or rescheduling was not a part of that solution. This specification clarifies what is rescheduling and rebalancing. Rescheduling would automatically happen on every event triggered by addition or deletion of chassis. Rebalancing would be only triggered by manual operator action.
In order to provide proper rescheduling of the gateway ports during addition or deletion of the chassis, following approach can be considered:
MAX_GW_CHASSIS is defined in [0]
Rescheduling is an event triggered operation which will occur whenever a
chassis is added or removed. When it happend, schedule_unhosted_gateways()
[1] will be called to host the unhosted gateways. Routers without gateway
ports are excluded in this operation because those are not connected to
provider networks and haven’t the gateway ports. More information about
it can be found in the gateway_chassis
table definition in OVN
NorthBound DB [5].
Chassis which has the flag enable-chassis-as-gw
enabled in their OVN
southbound database table, would be the ones eligible for hosting the routers.
Rescheduling of router depends on current prorities set. Each chassis is given
a specific priority for the router’s gateway and priority increases with
increasing value ( i.e. 1 < 2 < 3 …). The highest prioritized chassis hosts
gateway port. Other chassis are selected as slaves.
There are two approaches for rescheduling supported by ovn driver right now: * Least loaded - select least-loaded chassis first, * Random - select chassis randomly.
Few points to consider for the design:
master
chassis for a
gateway router will be left untouched. However, for the scenario where all
routers are scheduled in only one chassis which is available as gateway,
the addition of the second gateway chassis would schedule the router
gateway ports at a lower priority on the new chassis.Following scenarios are possible which have been considered in the design:
Rebalancing is the second part of the design and it assigns a new master to already scheduled router gateway ports. Downtime is expected in this operation. Rebalancing of routers can be achieved using external cli script. Similar approach has been implemeneted for DHCP rescheduling [4]. The master chassis gateway could be moved only to other, previously scheduled gateway. Rebalancing of chassis occurs only if number of scheduled master chassis ports per each provider network hosted by given chassis is higher than average number of hosted master gateway ports per chassis per provider network.
This dependency is determined by formula:
avg_gw_per_chassis = num_gw_by_provider_net / num_chassis_with_provider_net
The rebalancing occurs only if:
num_gw_by_provider_net_by_chassis > avg_gw_per_chassis
Following scenarios are possible which have been considered in the design:
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.